- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我在 Swift 项目的 Xcode 8.2.1 中遇到“No such module”编译错误。我将 Carthage 与两个模块一起使用:Alamofire 和 Fuzi。 Carthage/Build/iOS
目录与两个框架文件一起存在。 Build Settings/Framework Search Paths
指向该目录。我已将这两个框架文件嵌入到 General/Embedded Binaries
中。我错过了什么?
最佳答案
您不需要嵌入库;它们应该添加到“常规/嵌入式二进制文件”部分下的链接框架和库。确保将 Carthage copy-frameworks 脚本添加到构建阶段。
来自迦太基文档:
On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk. On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell:
/usr/local/bin/carthage copy-frameworks
and add the paths to the frameworks you want to use under “Input Files”, e.g.:
$(SRCROOT)/Carthage/Build/iOS/Box.framework
$(SRCROOT)/Carthage/Build/iOS/Result.framework
$(SRCROOT)/Carthage/Build/iOS/ReactiveCocoa.frameworkThis script works around an App Store submission bug triggered by universal binaries and ensures that necessary bitcode-related files and dSYMs are copied when archiving.
关于ios - Xcode 8 中的 "No such module"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41409467/
我是一名优秀的程序员,十分优秀!