In many applications, such as the Mail app, if the device is in airplane mode a notification will pop up that says \"Turn Off Airplane Mode or Use Wi-Fi to Access Data.\"
If you want the standard Turn Off Airplane Mode or Use Wi-Fi to Access Data [settings | ok]
info.plist
by clicking the +
sign at the top.UIRequiresPersistentWiFi
(this is similar to postings above, but needs to be exact otherwise it doesn't register)String
to Boolean
NO
to YES
Take a look at this. Apparently, Airport control was moved by Apple into a separate framework
It seems there is no standard way to notify the user to turn airplane mode back on. As you mentioned, this obviously isn't very elegant, so I assume apple deleted this feature.
I test in my app. I find it changed. "UIRequiresPersistentWifi" => "Application uses Wi-Fi". I hope it will help somebody.
You could use the apple's reachablity framework when you app launches to check for network connectivity. Check this out
http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html
I have a wrapper class for reachbiltiy APIs to make it simpler to use. (ASIHTTPRequest has one as well).
https://github.com/daltoniam/GPHTTPRequest
see the GPReachablity class for checking for connectivity. As far as a dialog prompt, not sure there is a way to push to the settings app. Any questions let me know.
If you add the UIRequiresPersistentWifi
key to your Info.plist
and set it to YES
, then if you're in Airplane mode, you'll get the standard "Turn Off Airplane Mode..." popup on launch.