加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – Xcode 7链接器与Google Maps SDK的问题

发布时间:2020-12-15 01:58:50 所属栏目:百科 来源:网络整理
导读:我刚刚下载了Xcode 7 beta 4,并试图构建我的Swift 2.0应用程序,但是我收到以下错误,我无法找出解决方案: ld: warning: -weak_framework is treated as -framework when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES). Weak linking may
我刚刚下载了Xcode 7 beta 4,并试图构建我的Swift 2.0应用程序,但是我收到以下错误,我无法找出解决方案:

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:
‘path/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(GMSBillingPointRecorder.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)

有谁知道如何解决这个问题?

解决方法

将ENABLE_BITCODE标志设置为NO可解决问题。

对于那些想知道它是否安全禁用它的人。是的。

根据Apple Doc

Bitcode (iOS,watchOS)

Bitcode is an intermediate representation of a compiled program. Apps
you upload to iTunes Connect that contain bitcode will be compiled and
linked on the App Store. Including bitcode will allow Apple to
re-optimize your app binary in the future without the need to submit a
new version of your app to the store.

Xcode hides symbols generated during build time by default,so they
are not readable by Apple. Only if you choose to include symbols when
uploading your app to iTunes Connect would the symbols be sent to
Apple. You must include symbols to receive crash reports from Apple.

Note: For iOS apps,bitcode is the default,but optional. If you
provide bitcode,all apps and frameworks in the app bundle need to
include bitcode. For watchOS apps,bitcode is required.

Bitcode是苹果新的App Thinning的一部分。在撰写本文时,它是可选的,但可能在以后需要。我认为苹果正在为框架/ libs社区提供时间来适应。

编辑:
在Xcode 7中,您可以将iTunes应用程序上传到Bitcode的中间状态。当用户下载您的应用程序时,App Store会自动生成您的应用程序的优化版本(如果需要,将为64位),以匹配用户正在使用的设备。

现在我们可以做的是禁用位代码,等待Google Maps SDK的更新。

UPDATE

SDK 1.11.0 – 现在支持Bitcode

https://developers.google.com/maps/documentation/ios-sdk/releases?hl=en

资源:

Impact of Xcode build options “Enable bitcode” Yes/No

https://developer.apple.com/library/prerelease/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html

https://www.hackingwithswift.com/ios9

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读