[iOS] How to Display the Alert Dialog "Turn Off Airplane Mode or Use Wi-Fi to Access Data." / "データにアクセスするには、機内モードをオフにするか、Wi-Fiを使用して下さい。"

Tadashi Shigeoka ·  Wed, May 8, 2013

I’ll introduce how to display the following alert dialog in iPhone apps when airplane mode is enabled, Wi-Fi settings are OFF, or there’s no internet connection:

English Turn Off Airplane Mode or Use Wi-Fi to Access Data.

Japanese データにアクセスするには、機内モードをオフにするか、Wi-Fiを使用して下さい。

In Xcode, simply add the following setting to Project > TARGETS > Info > Custom iOS Target Properties:

Application uses Wi-Fi : YES

The diff for Info.plist will look like this:

UIRequiresPersistentWiFi

So simple! Just adding one setting takes care of it!

[Reference]

Retina対応させたiPadアプリがRejectされて戻って来た件 | Macで遊んでる

That’s all from the Gemba.