4

I never had any problems when using CocoaPods up to this point (I used it a few times to integrate Parse into my iOS app). But this time I am puzzled by the message below.

When I previously used CocoaPods the project was containing only one target, this time it contains several. There may be something to be careful about, in such a case, that I don't know of. Anyway, here is the message I am getting:

        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)

I have tried to change the Enable Bitcode flag at various level, but whatever I do I keep getting the same error.

Has anyone had this kind of issue? Or knows what to do about it?

Note that this link is related to my question but it unfortunately does not provide me a useful answer.

Update: I add hereafter the full text I get in the logs under Xcode, in case it may help someone to see where the problem is:

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)
Community
  • 1
  • 1
Michel
  • 10,303
  • 17
  • 82
  • 179
  • 1
    Possible duplicate of [Impact of Xcode build options "Enable bitcode" Yes/No](http://stackoverflow.com/questions/31088618/impact-of-xcode-build-options-enable-bitcode-yes-no) – xoudini Jan 26 '17 at 11:55
  • As mentioned in the above question, this was previously a warning which was to be changed to an error in the future. Disabling the 'Enable bitcode' setting should allow you to build successfully. – xoudini Jan 26 '17 at 12:01
  • As I wrote I tried several settings and setting 'Enable bitcode' to NO didn't make any difference. – Michel Jan 26 '17 at 12:26
  • The link given as a possible duplicate is certainly related but it doesn't give me an answer. – Michel Jan 26 '17 at 12:55
  • That's odd, have you tried cleaning (⇧⌘K) the project after disabling bitcode? – xoudini Jan 26 '17 at 13:03
  • Since you mentioned you have several targets in the workspace, did you double check that you changed the setting on the correct target? – xoudini Jan 26 '17 at 13:08
  • Yes to both questions. Unless I am not disabling in the right place, but I know only one. – Michel Jan 26 '17 at 13:23
  • I'm unable to reproduce with the same lib linked through Cocoapods. – xoudini Jan 26 '17 at 13:33
  • I had a similar issue, not so long ago, without using cocoapod. And using cocoapod got me out of trouble (I don't quite know why). Now the problem is back. It was on a different project though. – Michel Jan 26 '17 at 13:50
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/134097/discussion-between-michel-and-xoudini). – Michel Jan 26 '17 at 16:05

1 Answers1

9

My solution was to disable bitcode in the project, like this

enter image description here

everything works fine after.

Bright
  • 5,699
  • 2
  • 50
  • 72