How to invoke “Turn Off Airplane Mode” notification

后端 未结 5 1647
南方客
南方客 2020-12-14 11:00

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

5条回答
  •  时光说笑
    2020-12-14 11:26

    If you want the standard Turn Off Airplane Mode or Use Wi-Fi to Access Data [settings | ok]

    1. Add a new property in your info.plist by clicking the + sign at the top.
    2. The new property is called UIRequiresPersistentWiFi (this is similar to postings above, but needs to be exact otherwise it doesn't register)
    3. Change type from String to Boolean
    4. Change value from NO to YES
    5. Clean and rebuild your app

提交回复
热议问题