Can an iOS app detect when cellular is disabled while Wi-Fi remains enabled?

Hello,

I am evaluating a technical concept for an airline passenger application and would like to clarify what is possible using public iOS APIs.

Is there any supported public API, framework or entitlement that allows an iOS application to reliably determine whether:

  1. cellular radio/connectivity has been disabled by the user, while
  2. Wi-Fi remains enabled and connected?

The goal is only to verify this device state. The application would not attempt to enable or disable Airplane Mode or cellular connectivity itself.

I have reviewed Core Telephony, but it does not appear to provide an explicit and reliable Airplane Mode state.

Would there be a supported way for an airline application to verify this condition, or is this intentionally unavailable to third-party applications on iOS?

Thank you for your guidance.

Kind regards, Colin Friedrichs

Answered by DTS Engineer in 903525022
Is there any supported public API … to reliably determine …

Not really. There are APIs that let you introspect the networking stack, but they all come with caveats. For example:

  • There’s a difference between cellular being disabled and WWAN not working.
  • There’s a difference between WWAN not working and your app have access to WWAN.
  • Similar for Wi-Fi.
  • Remember that ‘disabling’ Wi-Fi in Control Centre is different from disabling it in Settings.
  • And that on an iPhone bought in China the user has the option to disable Wi-Fi access in addition to disabling WWAN access.
  • Options like Ethernet significantly muddy the waters.

So, questions like this inevitably boil down to what exactly you’re trying to achieve. A lot of the time there are options that work for specific scenarios that don’t work generally.

Anyway, lemme point you in the direction of Extra-ordinary Networking, which links to a bunch of other posts that explain a lot of the background to this stuff.

Share and Enjoy

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

Is there any supported public API … to reliably determine …

Not really. There are APIs that let you introspect the networking stack, but they all come with caveats. For example:

  • There’s a difference between cellular being disabled and WWAN not working.
  • There’s a difference between WWAN not working and your app have access to WWAN.
  • Similar for Wi-Fi.
  • Remember that ‘disabling’ Wi-Fi in Control Centre is different from disabling it in Settings.
  • And that on an iPhone bought in China the user has the option to disable Wi-Fi access in addition to disabling WWAN access.
  • Options like Ethernet significantly muddy the waters.

So, questions like this inevitably boil down to what exactly you’re trying to achieve. A lot of the time there are options that work for specific scenarios that don’t work generally.

Anyway, lemme point you in the direction of Extra-ordinary Networking, which links to a bunch of other posts that explain a lot of the background to this stuff.

Share and Enjoy

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

Can an iOS app detect when cellular is disabled while Wi-Fi remains enabled?
 
 
Q