我尝试通过命令行构建Xcode项目:
xcodebuild -project MyAppLib.xcodeproj -sdk iphoneos -target MyAppTracker -configuration发布清理版本 OTHER_LDFLAGS = -fembed-bitcode OTHERCFLAGS = -fembed-bitcode;
但我收到错误:
Ld build / MyAppLib.build / Release-iphoneos / MyAppTracker.build / Objects-normal / armv7 / MyAppTracker 正常的armv7 cd / Users / snaggs / MyApp / projects / BuildMachine / ios / MyApp_sdk_ios / MyAppLib export IPHONEOS_DEPLOYMENT_TARGET = 10.0 export PATH =“/ Applications / Xcode.app / Contents / Developer / Platforms / iPhoneOS.platform / Developer / usr / bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ Users / snaggs / PostgreSQL / data / pg96:/用户/ snaggs /库/安卓/ SDK /平台的工具:/用户/ snaggs /库/安卓/ SDK /工具:在/ usr / local / bin目录:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录:/应用/ Clojure的:” /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk -L /用户/ snaggs / MyApp的/项目/ BuildMachine / IOS / MyApp_sdk_ios / MyAppLib /构建/发布-的iPhoneOS -F /用户/ snaggs / MyApp的/项目/ BuildMachine / IOS / MyApp_sdk_ios / MyAppLib /构建/发布-的iPhoneOS -filelist /Users/snaggs/MyApp/projects/BuildMachine/ios/MyApp_sdk_ios/MyAppLib/build/MyAppLib.build/Release-iphoneos/MyAppTracker.build/Objects-normal/armv7/MyAppTracker.LinkFileList -install_name @ rpath / MyAppTracker.framework / MyAppTracker -Xlinker -rpath -Xlinker @ executable_path / Frameworks -Xlinker -rpath -Xlinker @ loader_path / Frameworks -miphoneos-version-min = 10.0 -dead_strip -fobjc-arc -fobjc-link-runtime -fembed-bitcode -weak_framework iAd -weak_framework AdSupport -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker / Users / snaggs / MyApp / projects / BuildMachine / ios / MyApp_sdk_ios / MyAppLib /build/MyAppLib.build/Release-iphoneos/MyAppTracker.build/Objects-normal/armv7/MyAppTracker_dependency_info.dat -o /Users/snaggs/MyApp/projects/BuildMachine/ios/MyApp_sdk_ios/MyAppLib/build/MyAppLib.build/Release-iphoneos/MyAppTracker.build/Objects-normal/armv7/MyAppTracker ld:'/ Users /snaggs / MyApp / project / BuildMachine /ios / MyApp_sdk_ios / MyAppLib / build / MyAppLib.build / Release -iphoneos / MyAppTracker.build / Objects-normal / armv7 / MyAppTracker_vers.o'不包含位码。您必须在启用bitcode的情况下重建它 (Xcode设置ENABLE_BITCODE),从中获取更新的库 供应商,或禁用此目标的bitcode。 for architecture armv7
我错过了什么吗?
$ xcodebuild -showBuildSettings | grep ENABLE_BITCODE
ENABLE_BITCODE = YES
答案 0 :(得分:1)
编译标志应为OTHER_CFLAGS
而不是OTHERCFLAGS
。