关于xcode7之后不用证书真机测试报错问题

大家都知道,xcode7问世之后可以不通过申请测试证书等一系列东西,来达到真机测试,然后会遇到一个问题,xcode在真机测试中会报错,

错误大概如上.

下面我说一下原因,从错误中看,是因为一个第三方库类报错了,而且还与bitcode有关,那么我们就去看一下bitcode

关于xcode7之后不用证书真机测试报错问题_第1张图片

发现xcode默认设置bidcode为YES

果断将bit code修改为NO,运行发现 ,可以进行真机测试了.


原因是什么呢?原来在导入的第三方库中又不支持bitcode的,所以你只能修改第三方库支持bitcode或者关掉bitcode,当然还是关掉比较快.


而bit code呢

好吧 我们去查询一下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位程序。

可到这里,我还是不太明白是神马意思,通过查阅相关资料,得出的结论是 这个东西应该和包得优化有关。

最后总结一下,解决问题的办法就是关掉bitcode 简单暴力 哈哈

你可能感兴趣的:(关于xcode7之后不用证书真机测试报错问题)