Search code examples
iosios-simulatorshareios9app-transport-security

Ignoring App Transport Security


For iPhone 6S PLUS simulator in debug area I received the following message:

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.

I only have a social share button implemented via SLComposeViewController. Inside the social share button I use an HTTP. That's HTTP is for the user to share their scores with their social accounts. Even though i'm receiving the above message, the sharing still works as it's supposed to.

So can I Ignore the App Transport Security issue and just send the app for app store review anyways? If I ignore it, would my app get rejected also?


Solution

  • Most social urls have an HTTPS equivalent. Can you try and use the HTTPS url to share the scores? This will eliminate the warning that you receive.

    If you can't use an HTTPS url, the other solution is to configure an exception to the rule in your info.plist. This essentially will ignore the App Transport Security rule for the specified urls.

    It's also possible to turn off the warning for all urls (also via the info.plist). However this is not recommended, and if you don't have a good reason to do so, the App Store may reject your app.

    Have a read through: info.plist reference for more details.

    I hope that helps.