ios9的新特性
来源:互联网 发布:php 输出html 编辑:程序博客网 时间:2024/05/08 08:46
ios9适配 xcode7新特性 ios9开发 Xcode7报错
- |
- 浏览:20
- |
- 更新:2015-11-12 09:16
- 1
- 2
- 3
- 4
- 5
- 6
- 7
xcode升级到7之后 重新编译自己的程序就会发现有很多的警告和错误
下面总结一下自己遇到的一些问题
工具/原料
- xcode7及以上
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
2.warning: Could not resolve external type c:objc(cs)NSTimer
编译时出现很多类似
warning: Could not resolve external type c:objc(cs)NSTimer
的警告 非常之多 我的能达到八九十条
找到自己工程的target->build settings
直接搜索debug
找到build options下的debug information format
将对应的debug由之前的DWARF with dSYM File 改为DWARF就可以了
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
4.微信SDK出錯
xcode7中当我们的工程中使用了微信的SDK时也会报错
包括使用了分享、收藏、支付、登录等功能
同样需要在info.plist进行配置
在info.plist中添加以下内容
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>wechat</string>
</array>
同样第一步的网络访问错误修改也需要添加到info.plist中
- iOS9的新特性
- ios9的新特性
- iOS9的新特性
- iOS9开始的新特性
- iOS9和iOS9新特性
- iOS8和iOS9新特性的总结
- iOS9新特性需要注意的问题
- iOS9 iOS10 iOS11的新特性
- iOS9新特性
- iOS9 新特性
- ios9新特性
- ios9新特性
- iOS9新特性
- iOS9 新特性
- iOS9之新特性
- iOS9新特性
- iOS9新特性
- iOS9 新特性
- 使用SQLite3存储和读取数据
- HDU 5526 Lie
- 目前和接下来的android
- leetcode 53:Spiral Matrix
- 基于Google云存储的开放Maven镜像中央仓库
- ios9的新特性
- Java学习笔记(继承、接口)
- windows上安装protobuf
- 公司中的经理数, 公司中的非经理员工数量
- 仿迅雷下载项目分析
- mac 安装erlang 错误 原因:更新了xcode
- PriviledgedActionException as:Administrator cause:java.io.IOException
- MyBatis Generator自动创建代码
- hdu 1556 Color the ball