2017-01-26 61 views
1

到目前爲止,我使用CocoaPods時沒有遇到過任何問題(我用過幾次將Parse集成到我的iOS應用程序中)。但是這一次我對下面的消息感到困惑。「libParseLib.a不包含位代碼」錯誤

當我以前使用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) 

我曾嘗試在不同的層次上的變化使能位碼標誌,但無論我做什麼我繼續得到同樣的錯誤。

有沒有人有這種問題?或知道該怎麼辦?

請注意,這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) 
+1

[影響Xcode構建選項「Enable bitcode」Yes/No]可能的重複(http://stackoverflow.com/questions/31088618/impact-of-xcode-build-options-enable-bitcode-yes-no ) – xoudini

+0

正如上面提到的問題所述,這在以前是一個警告,將來會改變爲一個錯誤。禁用「啓用位代碼」設置應該允許您成功構建。 – xoudini

+0

正如我寫的,我嘗試了幾個設置,並將'啓用位碼'設置爲NO沒有任何區別。 – Michel

回答

1

我的解決辦法是在項目中禁用位碼,這樣

enter image description here

一切後,精品工程。

相關問題