I have this new warning about the Google Framework in my app:
(null): URGENT: all bitcode will be dropped because '/Users/myname/Library/Mobile Documents/com~apple~CloudDocs/foldername/appname/GoogleMobileAds.framework/GoogleMobileAds(GADSlot+AdEvents.o)' was built without 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. Note: This will be an error in the future.
Xcode 7 is giving me around 204 warnings about this same concept, and I could not get around with this. Also I have a problem accessing the network from my app. This is the error from the Debugging Area:
-canOpenURL: failed for URL: "kindle://home" - error: "This app is not allowed to query for scheme kindle"
All of these problems were not present in iOS 8.
答案 0 :(得分:1019)
您的库是在没有bitcode的情况下编译的,但是在项目设置中启用了bitcode选项。在目标Build Settings和Library Build Settings中说NO
到Enable Bitcode
以删除警告。
对于那些想知道是否需要启用bitcode的人来说:
对于iOS应用,bitcode是默认设置,但是可选。对于watchOS和tvOS应用程序,需要bitcode。如果您提供bitcode,应用程序包中的所有应用程序和框架(项目中的所有目标)都需要包含bitcode。
答案 1 :(得分:109)
在Xcode 7之后,默认情况下将启用bitcode选项。如果您的库是在没有bitcode的情况下编译的,但是在项目设置中启用了bitcode选项,您可以:
使用“库构建设置”删除警告。
有关详细信息,请转到documentation of bitcode in developer library。
WWDC 2015 Session 102:"Platforms State of the Union"
答案 2 :(得分:41)
在我的案例中避免了这个问题:
答案 3 :(得分:11)
如果您使用的是 CocoaPods ,并且想要为所有库禁用Bitcode,请在Podfile中使用以下命令
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
答案 4 :(得分:8)
免责声明:此版本适用于那些需要自动流程的continuous integration工作流程的用户。如果不这样做,请按照Javier's answer中的说明使用Xcode。
这对我来说可以通过命令行设置ENABLE_BITCODE = NO
:
find . -name *project.pbxproj | xargs sed -i -e 's/\(GCC_VERSION = "";\)/\1\ ENABLE_BITCODE = NO;/g'
请注意,在Xcode版本中,这可能会不稳定。它使用Xcode 7.0.1进行了测试,并作为Cordova 4.0项目的一部分进行了测试。
答案 5 :(得分:2)
解决canOpenURL失败的问题。这是因为iOS9中新的App Transport Security功能
阅读此文章以解决该问题http://discoverpioneer.com/blog/2015/09/18/updating-facebook-integration-for-ios-9/
答案 6 :(得分:-2)
Google最近修复此问题(2010年11月),请参阅https://code.google.com/p/analytics-issues/issues/detail?id=671。但请注意,作为一个好的解决方案,它会带来更多错误:)
您还必须遵循此处列出的初始化方法:https://developers.google.com/analytics/devguides/collection/ios/v2。
最新的说明会让您头疼,因为它引用了pod中未包含的实用程序。以下将失败cocoapod
// Configure tracker from GoogleService-Info.plist.
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);