我目前在Swift编码,我有一个错误:

没有这样的模块

但我不明白,因为这个模块在我的项目中,在“链接框架和库”和“嵌入式二进制文件”中声明。

框架是在Objective-C中,所以我为它写了一个桥标头。

请问,如何让Xcode识别框架?


当前回答

我仍然不能从xcode存档,但fastlane为我做了这项工作

其他回答

为了它的价值(我是使用Xcode 7.2/Swift 2的新手),但我注意到,只要从项目目录中的库中拥有. Swift文件,就可以自动地访问它,而不需要using语句。

示例:我正在使用SwiftyJSON,在项目中拥有SwiftyJSON.swift文件就是我所需要的。using语句实际上给了我“没有这样的模块”错误,并把它解决了,它工作得很好。

如果工作区中有多个项目,则需要:

向所有项目添加新配置 产品->清洁 删除派生数据 终端吊舱安装 构建您的项目。

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.

解决苹果iOS xcode Version 12.3 (12C33) Webview问题

简单地做3步:

使用.xcodeproj打开项目 Xcode辞职 从.xcworkspace重新打开项目

全部完成

请将此截图与您的构建设置进行比较。 这可能会奏效。 进入框架搜索路径: