How to display the message "Cellular data is disabled"?

Apple built-in apps display a pop-up message when the user has no cellular or Wi-Fi connection. It looks something like this:

"Cellular data is disabled

Turn on cellular data or use Wi-Fi to access data

[Settings] [OK] "

Clicking the "Settings" button opens the settings panel.

Is this a system popup? How can I use it in my application?

I'm already using UIRequiresPersistentWiFi, but it uses a different type of message that appears when airplane mode is on.

Thank!

+3


source to share


2 answers


See the Apple Sample for a usage example. It will provide you with all the code you need to determine if you are connected or not online.



0


source


You need to enable the app using wifi in the info.plist file. This warning is then displayed when cellular data is disabled and you are not connected to Wi-Fi.



0


source







All Articles