Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting NSAllowsArbitraryLoads in iOS 9 - Will Apple reject the app? [duplicate]

I suddenly get a message on iOS 9 :

The resource could not be loaded because the App Transport Security policy requires the use of a secure connection

Searched a bit and found that setting NSAllowsArbitraryLoads to YES fixes this which actually works.
However I also found that Apple may reject the App for this. Though stated in App Transport Security Technote

NSAllowsArbitraryLoads

A Boolean value used to disable App Transport Security for any domains not listed in the NSExceptionDomains dictionary. Listed domains use the settings specified for that domain.

But since this is the only solution working right now and also Apple may or may not reject the App, just wanted to confirm before publishing.

Update: Apple passed the review and my app is live now with this setting :)

like image 207
Nitish Avatar asked Sep 25 '15 05:09

Nitish


People also ask

What is Nsallowsarbitraryloads?

A Boolean value indicating whether App Transport Security restrictions are disabled for all network connections.

What is Nsexceptiondomains?

Discussion. The value for this key is a dictionary with keys that name specific domains for which you want to set exceptions. The value for each domain key is another dictionary that indicates the exceptions for that domain.

What is App transport security in iOS Swift?

On Apple platforms, a networking feature called App Transport Security (ATS) improves privacy and data integrity for all apps and app extensions. ATS requires that all HTTP connections made with the URL Loading System—typically using the URLSession class—use HTTPS.

What is Application Transport Security?

App Transport Security (ATS) is an iOS feature that forces mobile apps to connect to back-end servers using HTTPS, instead of HTTP, to encrypt data in transit. ATS enforces a minimum security level for communications between a mobile app and web services that support its functionality.


2 Answers

Update:

Apple announced that iOS apps have until January 1, 2017, to enable App Transport Security.

So,if you plan submit app to app store after 2017,please turn on ATS.

Also,see this link

====== Old answer=====

My experience:

I submit my app at 9/17/2015, and have passed the app store review process and successfully released the app.

Here is the info.plist screenshot of my app. enter image description here

So,I do not think apple will reject the app for this reason for now

Update:

My new app passed apple review process at 10/30/2015 with this key set to YES.

like image 172
Leo Avatar answered Oct 07 '22 18:10

Leo


Wasted a considerable amount of time (⏱ == 💸) because of this. Testing new NSURL... code failed with some users, worked with others. Had no idea why. Then stumbled on the log output which I normally don't watch (who really sees logs on an iPhone, seriously...) and there was this warning.

That was a rather nasty trick Apple... wasted time in debugging, wasted time in frustrating users, losing credibility in having software that "works". Broken spokes due to Apple's stick shoved in there. Going to have to toss Apple under the bus 🚌 with my testers on this one.

Ref: NSAppTransportSecurity : NSAllowsArbitraryLoads NSAppTransportSecurity : NSExceptionDomains

enter image description here

like image 42
Cerniuk Avatar answered Oct 07 '22 16:10

Cerniuk