Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect airplane mode on iOS

How can I detect if the phone is in airplane mode? (It's not enough to detect there is no internet connection, I have to be able to distinguish these 2 cases)

like image 772
Caner Avatar asked Jan 26 '11 12:01

Caner


People also ask

Can iPhone be tracked Airplane Mode?

Find My iPhone doesn't work on Airplane Mode. Or we say you can't track a phone on airplane mode. This is because location services for tracking your device usually require a network connection. Therefore, it's very hard for you to track your iPhone when it's offline on airplane mode.

Can you tell if a phone is on Airplane Mode?

On Android phones, airplane mode is activated by swiping down from the top of the screen two times to open the Settings panel. There, you'll see an airplane icon. When you activate it, your phone is on airplane mode. On an iPhone, the icon for airplane mode is in the Control Center.

How do I know if iPhone is in Airplane Mode?

To turn airplane mode on if you have an iPhone or iPad simply swipe up from the bottom of the screen. You'll see a little airplane icon in the menu that pops up - just click it and it'll turn orange. This means airplane mode is engaged.

Can you hide Airplane Mode iPhone?

Tap the "On/Off" button next to Airplane Mode at the top of the Settings window so that the button reads "Off."


2 Answers

Try using SCNetworkReachabilityGetFlags (SystemConfiguration framework). If the flags variable handed back is 0 and the return value is YES, airplane mode is turned on.

Check out Apple's Reachability classes.

like image 104
Felix Avatar answered Oct 08 '22 13:10

Felix


You can add the SBUsesNetwork boolean flag set to true in your Info.plist to display the popup used in Mail when in Airplane Mode.

like image 25
Zac White Avatar answered Oct 08 '22 15:10

Zac White