Xcode 7和ENABLE_BITCODE = YES设置不起作用

Dir*_*kLX 90 xcode7 bitcode

我已经跟随Xcode中新的ENABLE_BITCODE设置的几个线程,也尽可能多地尝试(承认我不是xcode专业版)但仍然无法让我的测试手机上的项目编译?

我的应用程序在模拟器上运行正常但我无法将其部署到我的iPhone上进行测试.在后一个我刚刚安装了iOS 9 beta.

现在,这是我收到的错误消息.看来该设置不会影响PARSE.com lib,这是我项目的一部分?如何将我的项目部署到手机上?谢谢你的建议.

    Ld /Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-  bnmizxueojwiqcbbnsvilljhosrw/Build/Products/Debug-iphoneos/Pods/Parse.framework/Parse normal armv7
cd /Users/xxxxxx/Documents/DigitalTempusDev/graffiti/Pods
export IPHONEOS_DEPLOYMENT_TARGET=8.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 armv7 -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Products/Debug-iphoneos/Pods -L/Users/xxxxxx/Documents/DigitalTempusDev/graffiti/Pods/Parse -F/Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Products/Debug-iphoneos/Pods -filelist /Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Intermediates/Pods.build/Debug-iphoneos/Pods-Parse.build/Objects-normal/armv7/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 -fembed-bitcode-marker -ObjC -lParseLib -lz -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework Accounts -weak_framework Social -ObjC -fobjc-arc -fobjc-link-runtime -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/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Intermediates/Pods.build/Debug-iphoneos/Pods-Parse.build/Objects-normal/armv7/Parse_dependency_info.dat -o /Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Products/Debug-iphoneos/Pods/Parse.framework/Parse

---
ld: warning: -weak_framework is treated as -framework when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES). Weak linking may still happen based on availability mark-up in headers
ld: warning: -weak_framework is treated as -framework when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES). Weak linking may still happen based on availability mark-up in headers
ld: '/Users/xxxxxx/Documents/DigitalTempusDev/graffiti/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 armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

Viv*_*ive 131

你确定你所选择Enable BitcodeNO对构建配置您正在使用(例如DEBUG)?您可以在项目enable bitcode- >目标 - >构建设置 - >搜索- >设置NO中查看DEBUG(很好记住尝试在测试发布之前更新库,也许它已经包含bitcode).然后编辑方案 - >运行 - >检查是否有DEBUG配置atm.

在此输入图像描述

  • 如果"启用Bitcode"设置为"NO",应用程序是否可以在App Store中接受? (3认同)

Max*_*ler 49

请注意,对于使用CocoaPods ENABLE_BITCODE = NO的项目,您应该同时设置项目和Pods容器项目目标.

这个错误

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)
Run Code Online (Sandbox Code Playgroud)

解决了:

在此输入图像描述

在此输入图像描述


Har*_*ani 16

我在Xcode7中也遇到了同样的问题.解决方案:

  • PROJECT
  • 建立 Settings
  • 选择 All Tab
  • 输入搜索 Enable Bitcode
  • Update Flagto No(将在你的项目之下(第二列))


Art*_*zak 15

我在使用GoogleAnalytics cocoa pod库时遇到了类似的问题,并且该库没有针对带有iOS 8的iPhone 6进行编译.

我的解决方案是在应用程序项目的目标中转向NO"Enable Bitcode"标志 - 而不是在Pods项目中.


Ale*_*der 10

我只是为我的项目设置它.

MyProjectTarget - > Build Settings - > Enable Bitcode = NO


eth*_*lan 10

如果您的Bitcode没有显示请选择全部.当xcode选择Basic时,你的Bitcode选项没有显示.

在此输入图像描述

当您选择All时,您可以看到Bitcode.之后为广告配置设置为"否" 在此输入图像描述


Gab*_*oux 5

正如大家所说,答案是设置Enable BitcodeNo在建的设置,但我觉得有些人可能有兴趣在做这个命令行

我的 Xcode 项目是由 Unity 生成的,我不希望对 Xcode 项目设置进行任何手动干预。也许有更好的方法或工具可以编辑构建设置,有点像PlistBuddy让你更新plist文件中的值。我不知道有任何工具可以为构建设置执行此操作,因此我正在使用sed

sed:基于正则表达式运行替换。

如何从命令行设置Enable BitcodeNo

在这里,我的项目名称是Unity-iPhone这样我从我的 Xcode 项目的根目录运行以下命令:

sed -i -e 's/ENABLE_BITCODE = YES;/ENABLE_BITCODE = NO;/g' \ 
Unity-iPhone.xcodeproj/project.pbxproj
Run Code Online (Sandbox Code Playgroud)

-e -- 指定要运行的 sed 命令
-i -- 就地编辑文件,为每个文件单独运行脚本

-i如果您只想预览它的功能,请删除;)

请注意,您的所有构建配置都将使用此命令更改,该行在ENABLE_BITCODE = YES;我的project.pbxproj.

现在我的构建步骤可以完全自动化,因为fastlane会负责其余的工作!