iOS "5G slicing" low-latency feature support in-app support

Hi, All. Does anybody can help me, please? I have read "Optimize your app for 5G" by Apple from June 10 2021 and watched WWDC21 video "Optimize for 5G networks", but wasn't been able to find answers for questions that interesting for me:

5G Slicing

Is iOS having any API for "5G Slicing" or support it somehow? Especially, interested in "Prioritise Low-Latency" feature of "5G Slicing". Can application send data using "low-latency" slice?

Gaming, ARKit, CoreML, SceneKit

In mentioned article - it's nothing about how to finally optimise it for gaming. No any examples and no any useful information related to highlighted frameworks.. is "5G optimisation" possible to do in case of WKWebView usage?

By my requirements, I need to use "5G Slicing" with low-latency in our gaming application. In Android it having network capability "low-latency"(NET_CAPABILITY_PRIORITIZE_LATENCY).

Is iOS having something similar?

Thanks all in advance for anyone who can help somehow.

Best regards, Eugene.

Replies

Just for the record, here’s a link to that article: Optimize your app for 5G.

Is iOS having any API for "5G Slicing" … ?

Yes.

There’s actually two ways to slice [hey hey!] this:

  • APIs

  • Device Management


On the API front, start here.

For BSD Sockets there’s also the SO_NET_SERVICE_TYPE option. I’m not 100% sure that maps to a 5G traffic category, but it’s worth setting regardless.


For managed devices, the device manager can assign apps to slices starting with iOS 17. I found WWDC 2023 Session 10040 What’s new in managing Apple devices informative on this subject. Start around the 20:15 mark.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Many thanks for your answer. It’s really helpful. I have investigated this, finally. But, some moments still unclear.

On the API front, start here.

I had setup entitlements that required.

<key>com.apple.developer.networking.slicing.appcategory</key>
<array>
	<string>communication-9000</string>
</array>
<key>com.apple.developer.networking.slicing.trafficcategory</key>
<array>
	<string>video-2</string>
</array>

I had created an URLRequest and changed networkServiceType property to video (because only it fit our requirements with low-latency)

urlRequest.networkServiceType = .video 

and tried to load WKWebView with this request

webView.load(urlRequest)

But, i'm not sure that "slicing" works. And no idea how to debug it.

Now, next interesting question for me. Is it possible to check that current network (5G) support slicing?

In case, if my solution won't work (I'm not sure that is WKWebView supporting it, because in documentation it's about URLSession & WebSockets only)

We have some idea: Try to route all application traffic (including WKWebView) through the "Cellular 5G" even if device connected to Wi-Fi. Interesting, is it possible?

For managed devices, the device manager can assign apps to slices starting with iOS 17. I found WWDC 2023 Session 10040 What’s new in managing Apple devices informative on this subject. Start around the 20:15 mark.

Device management is not suitable, because here a requirements to distribute customer’s app through the AppStore.

Thanks in advance.

Best regards, Eugene.

And no idea how to debug it.

I can’t help you on that front. I’ve never had cause to mess around with this stuff.

And then there’s that Note box at the bottom of the docs which says:

Cellular Network Slicing is only available on supported carriers. Check with individual carriers for availability.

So it’s quite possible that, even if you set this successfully, you’ll still see no visible effect.

I'm not sure that is WKWebView supporting it

Web views present some significant challenges because you have limited control over the networking that they do on your behalf. For example, if you set the networkServiceType property on your initial request does that then get replicated to cascading requests? I’ve no idea.

If you’re trying to determine whether this stuff works, I recommend that you divide the problem into parts. Start by determining if slicing yields a useful result with Network framework. If so, you can then explore whether it’s possible to replicate that result with URLSession. And once you get that working, you can start messing around with web views.

Right now you’re trying to debug everything at once, which is always a challenge.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hey, seems like two types of values can be passed for the cellularsliceUUID key - the data network name (DNN) or app category. What's the app category here? Is it the entitlements defined in the app?

What's the app category here?

Device management isn’t really my field, but the docs for this say:

The data network name (DNN) or app category. For DNN, the value is DNN:name, where name is the carrier provided DNN name. For app category, the value is AppCategory:category, where category is a carrier provided string like “Enterprise1”.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"