ios9适配 xcode7新特性 ios9开发 Xcode7报错
- |
- 浏览:20
- |
- 更新:2015-11-12 09:16
1.The resource could not be loaded because the App Transport Security policy requires the use of a secure connection
-
如果你的工程中有网络连接那么就会遇到以下的错误
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection
这是因为苹果提高的网络安全等级 默认使用https了
但我们大多数使用的还是http
-
所以就要在我们的工程中找到info.plist文件
添加以下信息
AppTransportSecurity为Dictionary,
AllowsArbitraryLoads为Boolean
这是最新的xcode7.1版本的
之前xcode7.0 使用的是
NSAppTransportSecurity为Dictionary,
NSAllowsArbitraryLoads为Boolean
几乎是一样的的就是少了NS
添加时注意类型
END
3.BitCode错误
-
编译时出现类似以下的信息
XXX 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
-
这个是xcode7中引入的bitcode编码
如果你的工程中使用很多第三方的类库时 就会出现这个错误
目前只能是关闭bitcode 或者是等到使用的第三方库更新支持bitcode了
所以最简单的是在工程中关掉bitcode了
-
找到工程的target
target->build settings
直接搜索bitcode
在build options下
找到Enable Bitcode
将之前的Yes改为NO就好了
END