Search code examples
swift3alamofireapp-transport-security

How to Solve " Error Domain=kCFErrorDomainCFNetwork Code=-1022 "(null)" Error


I have added AppTransportSecurity key in info.plist , and added a Subkey called AllowsArbitraryLoads as boolean and set its value to YES as like following image.

Image

But still showing this error:

{Error Domain=kCFErrorDomainCFNetwork Code=-1022 "(null)"}, NSErrorFailingURLKey=http://dtcws.azurewebsites.net/ShowImg.aspx?params=dtc_376_0_True_False_22, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.})

Can anybody help?


Solution

  • Can you add "Exception Domains" under App Transport Security and specify the domains. enter image description here