我目前在Swift编码,我有一个错误:
没有这样的模块
但我不明白,因为这个模块在我的项目中,在“链接框架和库”和“嵌入式二进制文件”中声明。
框架是在Objective-C中,所以我为它写了一个桥标头。
请问,如何让Xcode识别框架?
我目前在Swift编码,我有一个错误:
没有这样的模块
但我不明白,因为这个模块在我的项目中,在“链接框架和库”和“嵌入式二进制文件”中声明。
框架是在Objective-C中,所以我为它写了一个桥标头。
请问,如何让Xcode识别框架?
当前回答
确保项目文件夹不在iCloud Drive中。
其他回答
在General =>链接框架和库中,我添加了。/Pods/Pods。Xcodeproj成功了
对我来说,这发生在RxSwift上,问题是我在Podfile中将其修复为3.0.0。移除版本限制并更新pods将其升级到3.1.0,从而修复了它。
如果工作区中有多个项目,则需要:
向所有项目添加新配置 产品->清洁 删除派生数据 终端吊舱安装 构建您的项目。
我在使用Cocoapods和Swift时也遇到了同样的问题。我没有注意到Podfile中的以下行:
# Uncomment this line if you're using Swift
# use_frameworks!
所以,我所要做的就是把它改成:
# Uncomment this line if you're using Swift
use_frameworks!
...啊,它起作用了:)
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.