The resource could not be loaded is ios9

假装没事ソ 提交于 2019-12-10 13:39:57

问题


while m calling my api got this error in ios9 but it is working fine in ios8 The resource could not be loaded because the App Transport Security policy requires the use of a secure connection ios9


回答1:


You need to add one flag in plist. See more at https://forums.developer.apple.com/thread/3544




回答2:


I have solved it with adding some key in info.plist. The steps I followed are:

  1. Opened my Projects info.plist file

  2. Added a Key called NSAppTransportSecurity as a Dictionary.

  3. Added a Subkey called NSAllowsArbitraryLoads as Boolean and set its value to YES as like following image.

Clean the Project and Now Everything is Running fine as like before.

Ref Link:

  1. https://stackoverflow.com/a/32631185/2905967

  2. https://stackoverflow.com/a/32609970



来源:https://stackoverflow.com/questions/32069393/the-resource-could-not-be-loaded-is-ios9

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