为什么enable code 93BitCode真机测试要修改为 NO

访问人数:
总访问量:
知识改变命运,代码决定人生!!!
随着 Xcode7的面世,我们都清楚的知道,他可以不通过中的测试证书就可以真机测试了,对于我们开发者来说这是一个很好地事情,但是也会出现一些问题。
我们在做项目的时候,或多或少的会用的到第三方类库,那么问题来了,当你用 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 的话.再上传包的时候是可以看到这个选项的,截图我就不发了。
阅读(...) 评论()10:18 提问
真机测试出错误 在线等待大神
真机调试错误
No provisioning profiles found: No non–expired provisioning profiles were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'
怎么回事?公司分了一个开发小组成员给我证书什么的也都是按教程来的 但是就是一真机调试就是这个。
运行一下提示No non–expired provisioning profiles were found. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.好吧有道翻译一下
没有非过期配置概要文件被发现。Xcode可以解决这个问题,从会员下载一个新的配置配置文件中心。 好吧接着点击修复出现这个
Only agents and admins are allowed to add devices to this team. Please have a team admin or agent add this device for you.
If you need assistance, please contact Apple Developer Support ().
继续有道一下  只有代理和管理员可以将设备添加到这个团队。请团队管理或代理为你添加这个设备。
如果你需要帮助,请联系苹果开发者支持(
我郁闷了 设备添加了啊 求解
按赞数排序
1.选择工程-&Build Settings -& Code Signing -& Code Signing Identity -& Debug -& Any ios SDK 将选项改为:iPhone Developer
2.重新下载你的证书,或者修改通配符,或者说修改你的appid 。选择工程 -》Bundle Identifier
修改为最新的appid 。造成这种原因是因为你修改了你的app sdk版本。
如果还不行,可以试试
Edit Project Setting 下面的那个菜单:Edit Active Target “Hello World” =》Build =》 Code Signing =》 Any ios 的值设置为iphone Developer
其他相似问题ios7 真机调试 设置 bitcode - 吃饭了吗 - 博客园
用Xcode 7 beta 3在真机(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是个什么鬼?
查阅了一下官方文档,在App
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位程序。
再看看这两段描述,都是放在App Thinning(App瘦身)一节中,可以看出其与包的优化有关了。
Bitcode配置
在上面的错误提示中,提到了如何处理我们遇到的问题:
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
要么让第三方库支持,要么关闭target的bitcode选项。
实际上,在Xcode 7中,我们新建一个iOS程序时,bitcode选项默认是设置为YES的。我们可以在&Build Settings&-&&Enable Bitcode&选项中看到这个设置。不过,我们现在需要考虑的是三个平台:iOS,Mac OS,watchOS。
对于iOS,bitcode是可选的;对于watchOS,bitcode是必须的;而Mac OS是不支持bitcode。
如果我们开启了bitcode,在提交包时,下面这个界面也会有个bitcode选项:
所以,如果我们的工程需要支持bitcode,则必要要求所有引入的第三方库都支持bitcode。
通过本文对bitcode的概念及配置情况的简要介绍,希望iOS开发人员在工程运行中遇到类似的情况,可以根据上文的介绍更有效的找到原因并及时处理。
随笔 - 199}

我要回帖

更多关于 enable bitcode 设置 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信