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 :
If your app still needs to make insecure connections to specific domains, you can configure ATS exceptions for just those domains. Add Exception Domains directly to your app's Info. plist or in the project editor. Navigate to “Signing & Capabilities” and choose the “+ Capability” option.
App Transport Security (ATS) is a privacy feature introduced in iOS 9. It's enabled by default for new apps and enforces secure connections.
file that specifies the domains with which it needs secure communication. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you're creating a new app or updating an existing one.
NSAllowsArbitraryLoadsInWebContent. A Boolean value indicating whether all App Transport Security restrictions are disabled for requests made from web views.
your info plist hierarchy for transport should be like this
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With