ios - "libParseLib.a does not contain bitcode"错误

标签 ios cocoapods parse-server bitcode

到目前为止,我在使用 CocoaPods 时从未遇到过任何问题(我用它几次将 Parse 集成到我的 iOS 应用程序中)。但是这次我对下面的消息感到困惑。

当我以前使用 CocoaPods 时,项目只包含一个目标,这次它包含多个目标。在这种情况下,可能有一些我不知道的需要注意的地方。无论如何,这是我收到的消息:

        ld: '..../MyApp/Pods/Parse/libParseLib.a(PFSQLiteDatabase.o)' does not contain bitcode.
    You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE),
    obtain an updated library from the vendor, or disable bitcode for this target.
for architecture arm64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)

我曾尝试在不同级别更改 Enable Bitcode 标志,但无论我做什么,我都会遇到同样的错误。

有人遇到过这样的问题吗?或者知道该怎么做?

注意这个link与我的问题有关,但不幸的是,它没有为我提供有用的答案。

更新:我在 Xcode 下的日志中添加了完整的文本,以防它可以帮助别人查看问题所在:

Ld /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Parse-framework/Parse.framework/Parse normal arm64
    cd /Users/georgewhashington/Documents/iOS/MyApp/Pods
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -L/Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Parse-framework -L/Users/georgewhashington/Documents/iOS/MyApp/Pods/Parse -F/Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Parse-framework -F/Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Bolts-framework -filelist /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Intermediates/Pods.build/Debug-iphoneos/Parse-framework.build/Objects-normal/arm64/Parse.LinkFileList -install_name @rpath/Parse.framework/Parse -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Intermediates/Pods.build/Debug-iphoneos/Parse-framework.build/Objects-normal/arm64/Parse_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -ObjC -lParseLib -lsqlite3 -lz -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework Accounts -weak_framework Social -framework AudioToolbox -framework Bolts -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework Foundation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Intermediates/Pods.build/Debug-iphoneos/Parse-framework.build/Objects-normal/arm64/Parse_dependency_info.dat -o /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Parse-framework/Parse.framework/Parse

ld: '..../MyApp/Pods/Parse/libParseLib.a(PFSQLiteDatabase.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

我的解决方案是在项目中禁用 bitcode,就像这样

enter image description here

之后一切正常。

关于ios - "libParseLib.a does not contain bitcode"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41872838/

相关文章:

ios - 在IOS中从MDM服务器发送推送通知时出现推送通知错误

ios - Firebase Pod 代码更改

parse-server - 在不使用主 key 的情况下以用户身份登录解析服务器?

swift - 如何利用 PromiseKit 确保在继续之前检索到查询的对象?

android - 为 Android 和 iOS 创建 3D 图像 slider

ios - 从 Windows 向 iOS 提供地理位置数据

ios - 将 CAShapeLayer 代码从 iOS 转换为 OSX

ios - 我在 iOS pod lib lint 命令上收到 "WARN | url: (homepage) The URL is not reachable."?

ios - Xcode 未在正确的子目录中搜索 header

node.js - 如何为解析服务器记录器添加多个传输?