Is there a supported API to limit the bandwidth of devices connected via iPhone Personal Hotspot?

I'm developing an iOS app that aims to manage network usage on an iPhone acting as a Personal Hotspot.

I'd like to know whether there is a supported public API that allows a third-party iOS app running on the host iPhone to limit the download speed of devices connected through Personal Hotspot.

For example, I'd like to limit the download speed of tethered devices to a maximum of 1 Mbps, without limiting the host iPhone's own network traffic.

Is this technically possible using public iOS APIs, or is this type of bandwidth control restricted to the system?

Thank you for your guidance.

Answered by DTS Engineer in 911366022
Written by Pokpong in 911175022

I do not believe there is a public iOS API for shaping or rate-limiting traffic forwarded by Personal Hotspot.

Right. In fact, Personal Hotspot has no API at all. It’s a user-facing feature only. I’ve been warning folks about this for almost a decade.

IMPORTANT BSD interface names are not considered API on our platforms (something I talk about in the various posts linked to from Extra-ordinary Networking). Don’t build a product that assumes that tries to identify a Personal Hotspot interface based on its name. Those details have changed in the past and may well change again in the future.

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

I do not believe there is a public iOS API for shaping or rate-limiting traffic forwarded by Personal Hotspot. Network Extension APIs cover specific use cases, but NEHotspotHelper is for captive-portal style Wi-Fi authentication, not controlling tethered clients' throughput.

If you need a hard per-device limit, it would need to be enforced by the upstream network or router. A VPN or Network Extension on the iPhone would not give your app a supported hook to throttle only Personal Hotspot clients while leaving the iPhone's own traffic untouched.

Written by Pokpong in 911175022

I do not believe there is a public iOS API for shaping or rate-limiting traffic forwarded by Personal Hotspot.

Right. In fact, Personal Hotspot has no API at all. It’s a user-facing feature only. I’ve been warning folks about this for almost a decade.

IMPORTANT BSD interface names are not considered API on our platforms (something I talk about in the various posts linked to from Extra-ordinary Networking). Don’t build a product that assumes that tries to identify a Personal Hotspot interface based on its name. Those details have changed in the past and may well change again in the future.

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