Search code examples
iosios9ios-9-beta3app-transport-security

iOS 9 - App Transport Security wont load XML files


I am upgrading my app to iOS9. To Support ATS i had shifted all my urls to https. But ATS is throwing below error on XML files. The JSON files located at the same location have no problem.

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

JSON URL: https://www.example.com/content/123.xml

XML URL: https://www.example.com/content/123.json

Please suggest what might be the issue ? Thanks in advanced.


Solution

  • Run the following commands in Terminal :

    curl -v 'https://www.example.com/content/123.xml'
    curl -v 'https://www.example.com/content/123.json'
    

    It is highly probable that your server doesn't support SSL and redirects your url towards a standard http download.

    If this is the case there will be a Location header that indicates the new url.