Xcode 7 and ENABLE_BITCODE=YES setting does not work

前端 未结 9 1163
南笙
南笙 2020-12-22 23:33

I have followed several threads around the new ENABLE_BITCODE setting in Xcode, have also tried as much as I can (admitted I\'m not a xcode pro) but still cannot get the pro

相关标签:
9条回答
  • 2020-12-22 23:52

    I just set it for my project.

    MyProjectTarget -> Build Settings -> Enable Bitcode = NO

    0 讨论(0)
  • 2020-12-22 23:55

    I had also faced the same problem in Xcode7. Solution for this:

    • go to PROJECT
    • build Settings
    • select All Tab
    • type in search Enable Bitcode
    • Update Flag to No (which will be beneath of your project (second column))
    0 讨论(0)
  • 2020-12-22 23:56

    Note that for projects using CocoaPods you should set ENABLE_BITCODE = NO on both the project and the Pods container project targets.

    This error

    Ld /Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Products/Debug-iphoneos/ParseTwitterUtils.framework/ParseTwitterUtils normal arm64
        cd /Users/maximveksler/Developer/ParseUI-iOS/Pods
        export IPHONEOS_DEPLOYMENT_TARGET=9.0
        export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Products/Debug-iphoneos -L/Users/maximveksler/Developer/ParseUI-iOS/Pods/ParseTwitterUtils -F/Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Products/Debug-iphoneos -filelist /Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Intermediates/Pods.build/Debug-iphoneos/ParseTwitterUtils.build/Objects-normal/arm64/ParseTwitterUtils.LinkFileList -install_name @rpath/ParseTwitterUtils.framework/ParseTwitterUtils -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -fembed-bitcode-marker -ObjC -lParseTwitterUtilsLib -lsqlite3 -lz -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework Accounts -weak_framework Social -fobjc-arc -fobjc-link-runtime -framework AudioToolbox -framework Bolts -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework Foundation -framework Parse -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -single_module -compatibility_version 1 -current_version 1.8.1 -Xlinker -dependency_info -Xlinker /Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Intermediates/Pods.build/Debug-iphoneos/ParseTwitterUtils.build/Objects-normal/arm64/ParseTwitterUtils_dependency_info.dat -o /Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Products/Debug-iphoneos/ParseTwitterUtils.framework/ParseTwitterUtils
    
    ld: '/Users/maximveksler/Developer/ParseUI-iOS/Pods/ParseTwitterUtils/libParseTwitterUtilsLib.a(PFTwitterAuthenticationProvider.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)
    

    was resolved by:

    0 讨论(0)
  • 2020-12-23 00:01

    try this command in terminal if you arn't able to change BITCODE settings withing the project,

    xcodebuild -target "target" -configuration "configuration" ENABLE_BITCODE=NO

    0 讨论(0)
  • 2020-12-23 00:03

    I had similar problem with GoogleAnalytics cocoa pod library, and the library was not compiling for iPhone 6 with iOS 8.

    My solution was to turn to NO "Enable Bitcode" flag in target of the application project - not in Pods project.

    0 讨论(0)
  • 2020-12-23 00:04

    As everybody said, the answer is set Enable Bitcode to No in build settings, but I think some of you might be interested in doing this from the command line.

    My Xcode project is being generated by Unity and I don't want any manual intervention on the Xcode project settings. Maybe there's a better way or a tool that can edit Build Settings a bit like how PlistBuddy lets you update values in plist files. I don't know any tool that does this for build settings so I'm using sed.

    sed: Run replacements based on regular expressions.

    How to set Enable Bitcode to No from command line:

    Here, my project name is Unity-iPhone so I run the following command from the root of my Xcode project:

    sed -i -e 's/ENABLE_BITCODE = YES;/ENABLE_BITCODE = NO;/g' \ 
    Unity-iPhone.xcodeproj/project.pbxproj
    

    -e -- specify sed commands to run
    -i -- edit files in-place, running scripts separately for each file

    Remove -i if you only want a preview of what it does ;)

    Note that all of your build configurations will be changed using this command, the line ENABLE_BITCODE = YES; appeared 6 times in my project.pbxproj.

    Now my build steps can be fully automated as fastlane takes care of the rest!

    0 讨论(0)
提交回复
热议问题