According to the documentation from https://developer.apple.com/library/content/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-SW14, Apple forces to use HTTPS over HTTP in iOS 9.
App Transport Security
App Transport Security (ATS) lets an app add a declaration to its Info.plist file that specifies the domains with which it needs secure communication. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing one.
If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible.
What does that mean for web applications, esp. Sencha Touch and Cordova/PhoneGap based ones? My web app can be configured to any server address, so there's no way I can whitelist them in a plist file. Will this only be applicable for applications that use native requests (via NSURLRequest etc.)?
Try this:
cordova plugin add https://github.com/robertklein/cordova-ios-security.git
It will add the following part to the *-Info.plist
file during build process:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key> <true/>
</dict>
If you are not sure of which URL your application will connect or if you connect to many URLs, you can bypass the ATS (App Transport Security) by adding following keys in info.plist file.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key> <true/>
</dict>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With