Detect airplane mode on iOS

Caner picture Caner · Jan 26, 2011 · Viewed 22.6k times · Source

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)

Answer

Felix picture Felix · Jan 26, 2011

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.