Friday, July 1, 2016

ios not loading remote json or tile or anything


error:

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




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.

enter image description here
Clean the Project and Now Everything is Running fine as like before.
EDIT: OR In source code of info.plist file we can add that:

NSAppTransportSecurity
NSAllowsArbitraryLoads NSExceptionDomains yourdomain.com NSIncludesSubdomains NSThirdPartyExceptionRequiresForwardSecrecy


No comments: