Xcode7:libGGLAnalytics.a(GGLContext + Analytics.o)'不包含bitcode

con*_*ile 17 ios xcode7 bitcode

使用Xcode7.当我在模拟器上运行我的应用程序时,我没有错误.当我尝试在真实设备上运行时,我得到了这个:

ld: 'Test-IOS/Pods/Google/Libraries/libGGLAnalytics.a(GGLContext+Analytics.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)

我该如何解决这个错误?

Flo*_*ann 24

问题是Google Analytics for iOS目前不支持bitcode.以下是Google Code上的问题:

https://code.google.com/p/analytics-issues/issues/detail?id=671

目前的解决方法是禁用项目的bitcode.在Build Settings标签下的项目文件中,Build OptionsEnable Bitcode标志设置为false.

Bitcode标志

请注意,如果您完全禁用它,则无法为watchOS构建.似乎还有一种方法也只能为iOS禁用它,但之后你将无法在watchOS上使用分析.