Search code examples
xcode7app-transport-security

App Transport Setting exception domains not working xcode 7.3


How do I set an exception domain? I want to load a map ttile eg from the domain http://map1.vis.earthdata.nasa.gov.

I have added an exception but it's not working. Unless I use set "abritrary loads" instead I get the error "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."

enter image description here

UPDATE; attempt 2: enter image description here


Solution

  • You need to include subdomains for this to work with all nasa.gov subdomains by also adding NSIncludesSubdomains. Also, I would add NSExceptionAllowsInsecureHTTPLoads. Try getting your Info.plist to use the following settings under nasa.gov entry:

    enter image description here