我目前在Swift编码,我有一个错误:
没有这样的模块
但我不明白,因为这个模块在我的项目中,在“链接框架和库”和“嵌入式二进制文件”中声明。
框架是在Objective-C中,所以我为它写了一个桥标头。
请问,如何让Xcode识别框架?
我目前在Swift编码,我有一个错误:
没有这样的模块
但我不明白,因为这个模块在我的项目中,在“链接框架和库”和“嵌入式二进制文件”中声明。
框架是在Objective-C中,所以我为它写了一个桥标头。
请问,如何让Xcode识别框架?
当前回答
解决苹果iOS xcode Version 12.3 (12C33) Webview问题
简单地做3步:
使用.xcodeproj打开项目 Xcode辞职 从.xcworkspace重新打开项目
全部完成
其他回答
对于Xcode 10+和项目,还有一个建议。创建Xcode版本< 10,2。包含带有主项目所依赖的框架的子项目。问题是Xcode会将编译后的框架放在子项目中指定的目录中,这可能与主项目的构建目录不同。
检查文件>项目设置。现在,单击“Advanced…”并选择“Legacy”以外的内容作为构建路径,例如,“Unique”。在这种情况下,Xcode将把所有构建的组件放到一个文件夹中,它应该能够找到“丢失”的模块。
Another possible cause in XCode 10 can be the Supported Platforms sometimes gets changed to macOS and the Valid Architectures gets changed to i386 x86_64 for the Pods Projects. Assuming the project is for iOS, then select the Pods Project and change the Supported Platforms to iOS and the Valid Architectures to arm64 arm64e armv7 armv7s, You could do each of the Targets, however that takes longer if you have more than one Pod. Also the Swift version of frameworks in written Swift sometimes gets set to the wrong version.
我不太确定为什么Martin R在评论中对这个问题的回答被如此忽视:
确保您尝试简单地跳过导入框架,因为它已经与桥接头一起添加了。
希望这能有所帮助
我得到这个问题是因为我在podfile中设置了错误的目标(项目本身而不是UITests部分)。
我仍然不能从xcode存档,但fastlane为我做了这项工作