Networking is one of critical features for every iOS app.In iOS 9, there are some important update for networkings and related framework NSURLSession
Sample info.plist for exception http protocol
More explanation and keys on ATS
ATS only active when the app is built with iOS 9 SDK for iOS 9 and OX El Capitan
Automatic convert from http://
to https://
Use NSAllowsArbitraryLoads
for quick triage (allow load all http and https)
CFNETWORK_DIAGNOSTICS=1
to log all error from system networking
NSURLSession
supports HTTP/2
automatically and nothing to change in code
NSURLSession
availabe in watchOS 2
Best Practices
Download the minimal assets
Since the apps run very short time
NSURLConnection
is deprecated in OS 10.11 and iOS 9.0
NSURLSession
New features on NSURLSession
NSURLSessionStreamTask
NSURLSession
configuration and session delegates applies