您好,欢迎来到尔游网。
搜索
您的当前位置:首页The resource could not be loaded because the App Transport Security policy requires the use of a sec

The resource could not be loaded because the App Transport Security policy requires the use of a sec

来源:尔游网
Xcode 7 报错: 

Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."

这是因为Xcode 7以后,苹果要求所有的网络请求都是安全的(HTTPS).所有如果本身的服务器不支持HTTPS请求的话就要修改Xcode的默认配置.

在info.plist文件中,右击空白位置 Add Row .然后添加类型为Dictionary的NSAppTransportSecurity,在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- axer.cn 版权所有 湘ICP备2023022495号-12

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务