Optimize your app for 5G – Discover

Wi-Fi and LTE have long helped apps deliver connected experiences like video streaming, social networking and online gaming and 5G networks can provide even more options for leveraging high bandwidth and low latency in your app. Discover how to optimize your existing app or build a new product from scratch with 5G in mind so you can move more data faster and deliver a great experience to people around the world.

On this 5G game

One of the best ways you can take advantage of 5G’s high-performance features is to offer multiple versions of an asset depending on someone’s network connection. If someone using your app has a lower bandwidth connection, your app can download or deliver files that fit that network. similarly, you can provide assets with greater bandwidth when the connection supports it, so you can quickly provide more information. You can apply this to several different types of apps, including:

Streaming apps
Video streaming apps can integrate intelligent buffering and playback with AVFoundation to serve 4K (or 4K HDR) content to devices on 5G networks as well as lower bandwidth options when connected to LTE.

Learn more about AV Foundation

Use the bandwidth available on 5G networks to deliver higher quality visual images and games with larger texture maps and higher poly models than you would otherwise on lower bandwidth networks. In addition, 5G’s lower latency connection speeds up overall gaming and state-saving actions between players and your server backend.

Learn more about SceneKit

Machine learning apps
If your app uses Core ML, you can improve both the speed and reliability of your device’s intelligence when connected to a 5G network by automatically downloading larger .mlmodel and .mlarchive files from your server to run locally on someone else’s device.

Core ML

AR apps
While on 5G, you can deliver a greater number of high-resolution objects in your ARKit scenes to provide a richer enhanced experience for people interacting with your app. You can also use the extra bandwidth available over 5G networks to share even larger ARWorldMap and ARPointCloud objects in a shared AR experience – for example, work together to create physical spaces with virtual objects from your app.


Set up your downloads

Apple Network APIs automatically provide optimized administration and performance for each platform and network type. In addition, you can further optimize your app to address potential mobile issues such as speed and direction of movement, demand for mobile infrastructure and interference.

Forget the network
Because 5G networks typically offer better performance than Wi-Fi, it’s up to you to decide how your app best utilizes network resources — and you no longer have to rely on the overall type of network (mobile or Wi-Fi) to do so. . Instead, you can use Limited and Expensive to describe different network modes. Each of these states relies on information from a person’s choice of data mode (as defined in Settings> Mobile> Mobile data settings) as well as their mobile plan plan restrictions.

is expensive

is limited

For example, the network automatically switches to Restricted when someone activates low data mode. When a person’s network is set to Restricted, your app should minimize the use of network data regardless of the value of Expensive. If networking is expensive but not limited, your app should be considerate when retrieving network resources while not imposing strict restrictions. If the network is neither limited nor expensive, your app can focus on delivering the best quality with minimal data usage.

Each network framework uses the limited and expensive indicators in certain ways. When you e.g. Using URLRequest, your app can specify which resource to retrieve by specifying the appropriate value allowsConstrainedNetworkAccess and allowsExpensiveNetworkAccess properties. In contrast, when using NWConnection, your app can access the state of the network via stateUpdateHandler as isConstrained isExpensive properties of your connection’s currentPath. And if your app uses AVFoundation instead of the network framework or URLRequest, there are similar keys, including AVURLAssetAllowsConstrainedNetworkAccessKey and AVURLAssetAllowsExpensiveNetworkAccessKey.

Regardless of technique, keep in mind that the values ​​for Restricted and Expensive are transient and may change when someone moves from one type of network connection to another. If your app dynamically monitors these changes, you always provide the best experience for people, regardless of their connection.

Give a return
Unless your app is designed specifically for a network with guaranteed performance features, e.g. A corporate or private connection, always make sure it works well – even if no network is available at all. When someone first downloads your app, make sure it provides assets of acceptable quality as part of the package. If the app has fast connection periods, you can then download higher quality files and save them locally to ensure they are available when someone leaves the network area or completely offline.

Support your surroundings
Most mobile providers have prioritized 5G rollouts in high-density areas: entertainment venues such as sports stadiums and amphitheatres, transport centers such as train stations and airports, business and education centers and points of interest such as public parks and tourist brands. When people recognize that they’m in a high-performance network location, they may explicitly enable caching and other features in your app before going to a destination with reduced coverage – consider incorporating interface elements that notify and enable people to download all relevant content immediately

Take advantage of the built-in framework
Apple’s hardware and framework on the device are set to deliver advanced functionality in an energy efficient way. For example, you can use Core ML for intelligence on your device instead of client-server tours or the ARKit and Vision framework to capture, process, and present insightful information in the field. Processing on the device minimizes the need to exchange large amounts of data — let alone potentially personally identifiable information — and eliminates the need to connect to a back-end process in order to provide a useful service in your app.

When you need to move large amounts of data, you can rely on Smart Data Mode for 5G-enabled devices. This feature monitors the status of your app along with any Apple framework you currently use to automatically switch between existing mobile frequencies in a way that ensures your app gets the highest possible bandwidth – all without sacrificing battery life.

For example, when an app is in the foreground and plays video using AVFoundation frames, Smart Data Mode ensures that 5G high bandwidth is enabled. In addition, Smart Data Mode monitors the streaming experience while someone is connected to a 5G network. If the power is canceled due to traffic congestion – either by the mobile service provider or the limitations of your CDN – the feature will identify the throughput and move the power to an LTE connection to save power. Background requests for data using the core network frameworks can be operated just as well over LTE or lower power frequencies.

Get out there

Previously, testing your app’s network code involved switching network mode, switching between Wi-Fi and mobile data, and then using a network conditioner and other tools to change various features. While this is still a great way to test for basic utility cases, there is nothing that beats getting out and exploring the edge-case scenarios, only an implemented network can throw you away.

Start small
The App Store has a number of different apps that you can use to determine the properties of the network for a given area. With one of these apps and a regional carrier’s wireless coverage map, you can track the perfect locations in your area to ensure your app selects the right resources at the right time. And once you have found the perfect 5G networking site, move to another where your coverage is suboptimal and check your app. Did it continue to run? Is your streaming content degrading as expected or did you move to local resources? Did it deliver assets of acceptable quality after new installation? The more real utility cases you can test in advance, the better the experience in general for people around the world.

Go big
Although many third-party sites provide performance data to mobile networks, they are aggregate statistics and only an approximation of performance at the location where someone might be using your app. Because this data is only valuable as a baseline, it is not a substitute for knowing how your app is doing in nature. You can use Testflight for iOS to scale your beta testing to people and networks around the world. You may also want to consider setting up a TestFlight group — not only to ensure that your app is error-free, but that it works well based on the overall network characteristics of the cohort you have compiled.

Move to the edge
While the location of your server is not something you can always control, at the very least, try to influence or decide where your server infrastructure is located, and take steps to minimize the distance between your server and your app. Reducing the distance between people and your backend can greatly improve your app’s network performance. One way you can improve your own apps connectivity is by choosing a hosting provider that can connect your server back-end to map closely to the mobile networks your app uses. Alternatively, you could also consider using a few strategically placed CDNs.

Reach out

5G networks provide a real opportunity to enhance your existing app with richer data or build brand new experiences that were not previously possible. If you are working on creating a great experience with 5G and would like to share it with us, let us know.

Contact us

Learn more about 5G support in your apps

Leave a Comment