Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to invoke "Turn Off Airplane Mode" notification

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."

I thought that this would automatically be invoked if my app tries to access the internet, but it is not. Is there a special method to do this, or if not how can I check if the device is in airplane mode and provide a link to Settings to disable it?

like image 325
dgund Avatar asked Aug 14 '12 21:08

dgund


People also ask

Will I get notifications after I turn off airplane mode?

Calls, Messages, and Notifications Still your phone can do everything except make/receive cellular calls. You can enable Wi-Fi and Bluetooth later after activating airplane mode. Once you turn off the mode, you will receive all the messages and app notifications.

What happens with airplane mode notifications?

Enable Airplane Mode Doing so will turn off all wireless connections -- Wi-Fi, cellular and Bluetooth -- on your iPhone. Meaning, text messages, phone calls, emails and even your Apple Watch will stop receiving notifications until Airplane Mode is turned off.


2 Answers

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.

like image 180
Jason Moore Avatar answered Sep 28 '22 02:09

Jason Moore


I test in my app. I find it changed. "UIRequiresPersistentWifi" => "Application uses Wi-Fi". I hope it will help somebody.

xCode Target Properties

like image 24
user1302282 Avatar answered Sep 28 '22 02:09

user1302282