Use the available radios in iOS devices to improve your app’s network reliability and performance.
When using your app on an iOS device, users are likely to move in and out of range of Wi-Fi, switching to cellular networks and back again.
Multipath TCP improves the performance of your app when a user is in a location with limited Wi-Fi and while their device is transitioning to and from cellular data usage. In its default configuration, a URL session uses a single radio for a network call, preferring Wi-Fi over cellular. However, with Multipath TCP enabled, the URL session initiates the request on both radios and selects the more responsive of the two with a preference for Wi-Fi.
Enable Multipath TCP in Your App
These steps are required:
Multipath Entitlementin the Xcode Capabilities pane for your app target.
NSURLSessionto a mode other than
none. For most cases, the handover mode is the best option. This mode provides your users with a seamless transition between Wi-Fi and cellular, allowing uninterrupted usage of your app. (For information about other modes, see
Multipath Service Type
While the user’s device is connected to a reliable Wi-Fi network, your app uses only Wi-Fi, and no cellular data is consumed. As the user leaves the range of the Wi-Fi network and the signal starts to deteriorate, Multipath TCP begins transitioning data usage to the cellular network to provide a seamless transition.
Limitations when Using Multipath TCP with Wi-Fi Assist
Because Wi-Fi Assist is a user selectable, device-wide option, there are a few limitations when using Multipath TCP with that option enabled:
Wi-Fi Assist prevents flows from using cellular data when your app is in the background.
Wi-Fi Assist limits the amount of data that your app can send over cellular networks. When the limit is reached, Multipath TCP is disabled.
Wi-Fi Assist is integrated into the
NSURLSession API and doesn’t require any changes to the session configuration. At the start of each URL session task, Wi-Fi Assist determines whether to use Wi-Fi or cellular data for the connection.
After the URL session task begins, Wi-Fi Assist doesn’t change from Wi-Fi to cellular or from cellular to Wi-Fi. Multipath TCP extends the performance-improving capabilities of Wi-Fi Assist to provide seamless radio transition and improved throughput.