gpt4 book ai didi

xcode - 无法调试嵌入在 Objective-C 应用程序中的 Swift 模块/框架

转载 作者:行者123 更新时间:2023-12-03 09:19:28 24 4
gpt4 key购买 nike

Alternative titles (to aid searching)

  • Cannot debug Swift 2.3 framework linked to an Objective-C app in Xcode 8
  • error in auto-import: failed to get module 'XYZ' from AST context Xcode 8
  • Xcode 8 cannot debug Swift framework
  • warning: Swift error in module <XYZ>
  • Workaround for; Xcode Debugger cannot debug apps written in Objective-C only but that link against frameworks written in Swift only. (28312362)

我有一个用 Objective-C 编写的应用程序,它链接到一些用 Swift 2.x 编写的模块(框架)。
问题
一切(调试等)在 中都可以正常工作,但是当移动到 时并更新模块以使用 我无法调试模块。
LLDB 报告了这些错误:
warning: Swift error in module XYZ.
Debug info from this module will be unavailable in the debugger.

error: in auto-import:
failed to get module 'ABC' from AST context
如果我将模块链接到在 Swift 2.3 中构建的应用程序,则不会发生这种情况。

最佳答案

对我来说,这既简单又痛苦且耗时:
import SDWebImage 是问题 ,
因为其中一个框架中已经包含了 SDWebImage(我看不到它),而该框架恰好是 Objective-C,而应用程序是 Swift。
我还将 SDWebImage 添加到项目中,因为我在我编写的类中使用它,而这造成了 Xcode 调试器无法处理的困惑。
所以基本上,确保你没有以任何方式重复任何东西,我会检查常见的东西,例如 SDWebImage。

关于xcode - 无法调试嵌入在 Objective-C 应用程序中的 Swift 模块/框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39467654/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com