Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pop-up the "Cellular data is Turned Off" warning message?

Apple's built-in applications show a pop-up message whenever the user doesn't have cellular or wifi connectivity. It looks something like:

"Cellular data is Turned Off

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

[Settings] [OK]"

Clicking on the Settings button opens the settings panel.

Is this a system pop-up? How can I use it in my own application?

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

Thanks!

like image 237
djcouchycouch Avatar asked Nov 13 '22 08:11

djcouchycouch


1 Answers

You need to enable Application uses Wi-Fi in info.plist. Then this warning is displayed when cellular data is turned off and you're not connected to wi-fi.

like image 135
kyuss Avatar answered Nov 16 '22 03:11

kyuss