我正在使用 Xcode 7.3.1。
我的项目在 iOS 模拟器和我自己的 iPhone 上都能完美运行。但是,在归档我的项目时,我收到了警告和错误:
ld: warning: ignoring file /Users/parthsaxena/Desktop/Vantage/Vantage/Vantage/TextFieldEffects/TextFieldEffects.framework/TextFieldEffects, file was built for arm64 which is not the architecture being linked (armv7): /Users/parthsaxena/Desktop/Vantage/Vantage/Vantage/TextFieldEffects/TextFieldEffects.framework/TextFieldEffects
ld: bitcode bundle could not be generated because '/Users/parthsaxena/Desktop/Vantage/Vantage/Pods/FirebaseAppIndexing/Frameworks/FirebaseAppIndexing.framework/FirebaseAppIndexing(FIRAppIndexing.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
您可能已经注意到,我在我的项目中同时使用了 Firebase 和 TextFieldEffects 框架。
这个问题有什么解决办法吗?
最佳答案
您的库是在没有 bitcode 的情况下编译的,但是在您的项目设置中启用了 bitcode 选项。拒绝在目标build设置和库build设置中启用位码以删除警告。
对于那些想知道是否需要启用位码的人:
注意:对于 iOS 应用程序,位码是默认值,但可选。如果您提供 bitcode,则应用程序包中的所有应用程序和框架都需要包含 bitcode。对于 watchOS 应用程序,需要 bitcode。 https://developer.apple.com/library/prerelease/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html
关于ios - Xcode 7 归档失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38822590/