iOS 开发 设置网络请求允许使用http

来源:互联网 发布:安卓秒变iphone软件 编辑:程序博客网 时间:2024/05/28 11:50

控制台打印: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.
原因是:苹果官方为了安全使用了HTPPS 作为安全访问链接,如果想继续使用http

解决办法:修改info.plist文件
在 App Transport Security Settings 添加: Allow Arbitrary Loads 设置为YES
这里写图片描述

0 0
原创粉丝点击