Reputation: 27
Our app doesn't connect to network on iOS9 devices after re-building it with Xcode 7.2. Connections are fine on iOS8 and identical version that is currently on App Store is fine on iOS9 (built on Xcode 6). Did I miss updates to Xcode or iOS that would explain this? Thanks.
Upvotes: 1
Views: 36
Reputation:
iOS 9 introduced App Transport Security, which requires HTTPS (and a minimum TLS version). By default, insecure connections are no longer permitted.
Starting in iOS 9.0 and OS X v10.11, a new security feature called App Transport Security (ATS) is available to apps and is enabled by default. It improves the privacy and data integrity of connections between an app and web services by enforcing additional security requirements for HTTP-based networking requests. Specifically, with ATS enabled, HTTP connections must use HTTPS (RFC 2818). Attempts to connect using insecure HTTP fail. Furthermore, HTTPS requests must use best practices for secure communications.
If you are communicating with a server that does not support SSL, you can add an exception for that domain in your app's Info.plist
:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourdomain.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
Upvotes: 1