Preparing for iOS 9 – NSURLSession
Starting with the mParticle SDK 4.2.0 NSURLSession becomes the class of choice for sending and receiving data to our platform.
There are many changes coming with the new iOS 9 that may impact both developers and consumers. Among them are: App Transport Security, App Thinning (or bitcode), and one that is often overlooked but is the focus of this article, the deprecation of NSURLConnection in favor of NSURLSession.
NSURLConnection has been with us for many years but eventually began to show signs of aging. Although it will continue working on iOS 9, it has been deprecated and will no longer receive updates or bug fixes – so this could impact the security of your app. If your app had to support devices running an iOS version lower than 7, you had few choices but to use NSURLConnection or a third party component built on top of it. This is changing because of NSURLSession.
In 2013 Apple introduced NSURLSession together with iOS 7. This class and related classes have all the capabilities of NSURLConnection but can also handle more complicated tasks, such as delegating the download of a file to the operating system, sessions, credential policies, and so on. Furthermore, NSURLSession is required if you are developing an app for the watchOS 2. You can find more details about NSURLSession in the URL Loading System Programming Guide.
Starting with the mParticle SDK 4.2.0 NSURLSession becomes the class of choice for sending and receiving data to our platform. If you are using NSURLConnection and measuring network performance, the mParticle SDK will continue working for you (as well as with NSURLSession). However, all communication between the SDK Client and the SDK Server will be done using NSURLSession.
With the official unveiling of iOS 9 right around the corner, it’s important to keep these changes in mind and consider how they might impact your mobile business.
We can’t wait to see the awesome apps you guys will build!
Latest from mParticle
Treatwell partners with mParticle to bring innovative digital experiences to the hair and beauty community
Get started today
Try out mParticle and see how to integrate and orchestrate customer data the right way for your business.
Startups can now receive up to one year of complimentary access to mParticle. Receive access