簡體   English   中英

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

[英]Xcode7: libGGLAnalytics.a(GGLContext+Analytics.o)' does not contain 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) 

我該如何解決這個錯誤?

問題是Google Analytics for iOS目前不支持bitcode。 以下是Google Code上的問題:

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

目前的解決方法是禁用項目的bitcode。 在項目文件中Build Settings標簽下Build Options設置Enable Bitcode標志設置為false。

Bitcode標志

請注意,如果您完全禁用它,則無法為watchOS構建。 似乎還有一種方法也只能為iOS禁用它,但之后你將無法在watchOS上使用分析。

這是由Google解決的。 如果您進一步關注Google問題( https://code.google.com/p/analytics-issues/issues/detail?id=671 ),您會看到解決方案是更新到Google Analytics 3.14 SDK,其中包括bitcode支持。

如果您使用CocoaPods,請注意pod名稱有點不直觀。 如果您只使用Google Analytics,則需要:

pod'GoogleAnalytics'

NOT - > pod'Google / Analytics'

如果您使用的不僅僅是Google Analytics,那么您將需要第二個條目,但我相信可能仍然沒有Bitcode支持“Google / Analytics”庫。

我可以確認,如果你只需要Google Analytics,那么上面的確有效。 我在Xcode 7.2,BTW上。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM