Google后查证,iOS9引入了新特性App Transport Security (ATS)
。详情:App Transport Security (ATS)
新特性要求App内访问的网络必须使用HTTPS
协议。
但是现在公司的项目使用的是HTTP
协议,使用私有加密方式保证数据安全。现在也不能马上改成HTTPS
协议传输。
xcode7
NSAppTransportSecurity
类型Dictionary
。NSAppTransportSecurity
下添加NSAllowsArbitraryLoads
类型Boolean
,值设为YES
xcode7.1
昨天刚刚升级了XCode 7.1,然后在使用MPMoviePlayerController 播放在线流视频的时候报了HTTP的错误,如下:
Application 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 文件即可,修改如下:
搞定。
原文:http://www.cnblogs.com/wangzhao2015/p/4976172.html