升级Xcode7问题
来源:互联网 发布:网上打工软件 编辑:程序博客网 时间:2024/05/23 19:32
##Bitcode
***
在Xcode7下,运行我们的旧项目出现编译不过的问题,报错类似如下:
> ld: ‘/Users/XXX/Framework/SDKs/PolymerPay/Library/mobStat/XXXXSDK’ 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
提示的信息是,我们引入的第三方库不包含bitcode。
通过查阅可以看到官方文档的介绍如下:
> 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.
说的是bitcode是被编译程序的一种中间形式的代码。包含bitcode配置的程序将会在App store上被编译和链接。bitcode允许苹果在后期重新优化我们程序的二进制文件,而不需要我们重新提交一个新的版本到App store上。
在 What’s New in Xcode-New Features in Xcode 7中,又有如下描述:
> **Bitcode.** When you archive for submission to the App Store, Xcode compiles your app into an intermediate representation. The App Store then compiles the bitcode down into the 64- or 32-bit executables as necessary.
当我们提交程序到App store上时,Xcode会将程序编译为一个中间表现形式(bitcode)。然后App store会再将这个botcode编译为可执行的64位或32位程序。
那问题应该如何解决呢?
根据错误信息提示,要么让你引入第三方库支持bitcode,要么关闭工程的bitcode。
不过,我们现在需要考虑的是三个平台:iOS,Mac OS,watchOS。
* 对应iOS,bitcode是可选的。
* 对于watchOS,bitcode是必须的。
* Mac OS不支持bitcode。
对于第三方库暂时无法支持bitcode,解决办法就是关闭工程的bitcode
**在TARGETS -> Build Settings中搜素bitcode,将Enable Bitcode选项改为NO。**
##HTTP://
***
在iOS9中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据。
在使用到http的地方会报错如下:
> App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
解决办法是在info.plist中添加如下字段
<key>NSAppTransportSecurity</key><dict>
<key>NSAllowsArbitraryLoads</key>
<YES></dict>
***
在Xcode7下,运行我们的旧项目出现编译不过的问题,报错类似如下:
> ld: ‘/Users/XXX/Framework/SDKs/PolymerPay/Library/mobStat/XXXXSDK’ 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
提示的信息是,我们引入的第三方库不包含bitcode。
通过查阅可以看到官方文档的介绍如下:
> 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.
说的是bitcode是被编译程序的一种中间形式的代码。包含bitcode配置的程序将会在App store上被编译和链接。bitcode允许苹果在后期重新优化我们程序的二进制文件,而不需要我们重新提交一个新的版本到App store上。
在 What’s New in Xcode-New Features in Xcode 7中,又有如下描述:
> **Bitcode.** When you archive for submission to the App Store, Xcode compiles your app into an intermediate representation. The App Store then compiles the bitcode down into the 64- or 32-bit executables as necessary.
当我们提交程序到App store上时,Xcode会将程序编译为一个中间表现形式(bitcode)。然后App store会再将这个botcode编译为可执行的64位或32位程序。
那问题应该如何解决呢?
根据错误信息提示,要么让你引入第三方库支持bitcode,要么关闭工程的bitcode。
不过,我们现在需要考虑的是三个平台:iOS,Mac OS,watchOS。
* 对应iOS,bitcode是可选的。
* 对于watchOS,bitcode是必须的。
* Mac OS不支持bitcode。
对于第三方库暂时无法支持bitcode,解决办法就是关闭工程的bitcode
**在TARGETS -> Build Settings中搜素bitcode,将Enable Bitcode选项改为NO。**
##HTTP://
***
在iOS9中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据。
在使用到http的地方会报错如下:
> App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
解决办法是在info.plist中添加如下字段
<key>NSAppTransportSecurity</key><dict>
<key>NSAllowsArbitraryLoads</key>
<YES></dict>
效果如下图:
##插件
Xcode的升级都会带来之前的插件都是失效,解决办法仅需一行代码:
1. 退出Xcode
2. 打开MAC系统上的Terminal(终端)程序
3. 将下列的命令复制后粘贴上去:
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID`
4. 按回车键,重新打开Xcode,测试插件是否可用
欢迎订阅微信公众号iOSTalk,谈编程,分享iOS。
0 0
- 升级Xcode7问题
- xcode7升级后遇到问题
- 升级Xcode7.1 网络问题
- 升级xcode7问题汇总(持续更新)
- 关于Xcode7升级 适配iOS9的问题
- 升级Xcode7+后遇到的问题
- 升级Xcode7后遇到的一些问题
- 升级Xcode7遇到的问题及解决办法
- Xcode7 ios9 升级后出现的问题
- U3D 4.6.x 升级 xcode7 错误问题
- 升级Xcode7后Pod无法使用问题
- Xcode6升级到Xcode7 适配问题
- 升级xcode7系列版本插件失效问题
- 升级xcode7.3出现的问题
- Xcode7 升级后遇到的问题
- xcode7升级xcode8会出现的问题
- 升级xcode7 和 iOS9 后遇到的问题以及解决方案
- 升级xcode7 和 iOS9 后遇到的问题以及解决方案
- Node.js中的HTTP模块
- 信号量和共享内存
- java__递归
- android5.0源码开发之NVRam存储,恢复出厂设置数据不被擦除--上篇
- 第三周 项目2-建设“顺序表”算法库
- 升级Xcode7问题
- android编译ffmpeg+x264
- 如何使用Git上传项目代码到github
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
- openssl-1.0.0b - libssl 移植到ARM Linux
- halcon基本示例阈值操作
- Android动画——放大、缩小、旋转、平移、组合
- 选择排序
- VC++ unicode下读取unicode CFile::typeUnicodetxt的数据