EngineeringSeptember 08, 2015

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

A stock image of a woman hiking with the onX logo

How onX accelerated marketing campaigns with mParticle's AI engine

April 17, 2024
A headshot of mParticle's Director of Digital Strategy & Business Value, Robin Geier

Company

Introducing Robin Geier: mParticle's Director, Digital Strategy and Business Value

Robin Geier – April 16, 2024
M&S Customer Story

How Marks & Spencer drove revenue growth with mParticle's real-time segmentation and personalization

February 26, 2024
TVBS partners with mParticle

Company

TVBS partners with mParticle to build a 360-degree customer view

January 31, 2024

Try out mParticle

See how leading multi-channel consumer brands solve E2E customer data challenges with a real-time customer data platform.

Explore demoSign upContact us

Startups can now receive up to one year of complimentary access to mParticle. Receive access