gpt4 book ai didi

ios - Xcode 8 中的 "No such module"错误

转载 作者:搜寻专家 更新时间:2023-11-01 07:17:22 25 4
gpt4 key购买 nike

我在 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.framework

This 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/

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