Enable Allow arbitrary Loads of App Transport Security Setting not working in XCODE 9.2 and iOS 11.2

孤街浪徒 提交于 2021-02-20 16:19:00

问题


I used same setting for enabling arbitrary load but now i faced some issues.I used alamofire for json parsing.

info.plist settings:

and error is :


回答1:


your info plist hierarchy for transport should be like this




回答2:


NSAppTransportSecurity provides the network layer security and only allow http secured urls.

There are 2 ways to solve this:

Case 1:

In your code you are using an unsecure url with http:// replace it with https://, then it will work.

Case 2:

If you don't have ssl enabled url then, allow your url in Exception Domains as:



来源:https://stackoverflow.com/questions/49611336/enable-allow-arbitrary-loads-of-app-transport-security-setting-not-working-in-xc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!