-1

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?

joey gusto
  • 417
  • 6
  • 9

3 Answers3

4

Add Below Code to your Info.plist File and it will works

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
Viraj Padsala
  • 1,388
  • 1
  • 13
  • 31
0

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.

Jacob Joz
  • 732
  • 1
  • 11
  • 29
  • You're right, instead of using a temporary solution to a new long term problem, it's best to just add an S after HTTP since Facebook/Twitter both use HTTPS instead of HTTP anyways. – joey gusto Nov 10 '15 at 01:19
0

Viraj's solution will work however it is a work around, I would advise you to take a look here for some better solutions. Hope that helped :)

Community
  • 1
  • 1