PhoneGap中文网

 找回密码
 立即注册
查看: 20205|回复: 1
打印 上一主题 下一主题

xcode7.1 ios9.0以后极光推送以及第三方插件没法使用解决bitcode

[复制链接]

493

主题

2035

帖子

6894

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
6894
跳转到指定楼层
楼主
发表于 2015-11-20 11:29:40 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
随着 Xcode7的面世,我们都清楚的知道,他可以不通过https://developer.apple.com中的测试证书就可以真机测试了,对于我们开发者来说这是一个很好地事情,但是也会出现一些问题。

我们在做项目的时候,或多或少的会用的到第三方类库,那么问题来了,当你用 xcode在真机(iOS 8.3)上运行一下工程,结果发现工程编译不过。看了下问题,报的是以下错误:
ld: ‘/Users/**/Framework/SDKs/PolymerPay/Library/mobStat/lib**SDK.a(**ForSDK.o)’does not contain bitcode. You must rebuild it with bitcode enabled (Xcodesetting ENABLE_BITCODE), obtain an updated library from the vendor, or disablebitcode for this target. for architecture arm64
看警告可以得到的信息是"引入的一个第三方库不包含bitcode"。 嗯? bitcode 是神马东西呢?




好吧 我们去查询一下API 吧,终于找到了
在 Distribution Guide–App Thinning (iOS, watchOS) 一节中,找到了:
Bitcode is an intermediate representationof a compiled program. Apps you upload to iTunes Connect that contain bitcodewill be compiled and linked on the App Store. Including bitcode will allowApple to re-optimize your app binary in the future without the need to submit anew version of your app to the store.

说的是bitcode是被编译程序的一种中间形式的代码。包含bitcode配置的程序将会在App store上被编译和链接。bitcode允许苹果在后期重新优化程序的二进制文件,而不需要重新提交一个新的版本到App store上。

还有在What’s New in Xcode-New Features in Xcode 7中,还有一段如下的描述:
Bitcode. When you archive for submission tothe App Store, Xcode will compile your app into an intermediate representation.The App Store will then compile the bitcode down into the 64 or 32 bitexecutables as necessary.
当提交程序到App store上时,Xcode会将程序编译为一个中间表现形式(bitcode)。然后App store会再将这个botcode编译为可执行的64位或32位程序。
可到这里,我还是不太明白是神马意思,通过查阅相关资料,得出的结论是 这个东西应该和包得优化有关。

出现问题,我们要想办法解决它


在上面的错误提示中,提到了如何处理我们遇到的问题:
You must rebuild it with bitcode enabled(Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, ordisable bitcode for this target. for architecture arm64
意思就是说:要不你第三方类库支持 bitcode 要不你就关掉它

好吧,我们只能选择后者了
我们来看看他在那里?
新建一个工程,我们可以在”Build Settings”->”Enable Bitcode”选项中看到这个设置。当然我这里是改过的,其实新建的 xcode 工程 bitcode 是默认打开的!



好了改成 NO 就可以真机测试了!要是打包没有改为 NO 的话.再上传包的时候是可以看到这个选项的,截图我就不发了。





回复

使用道具 举报

11

主题

529

帖子

1418

积分

金牌会员

Rank: 6Rank: 6

积分
1418
沙发
发表于 2015-12-20 12:39:59 | 只看该作者
谢谢分享了我的也是报这个错误,这样解决的


回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2024-4-25 21:44 , Processed in 0.034391 second(s), 33 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表