2

I think I read somewhere that it was deprecated? and what is the alternatives?

I'm talking about the boolean in the info.plist that says: SBUsesNetwork = YES.

The alert shown says:

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

It has a really neat "Settings" button which takes you to the settings app.


I'm aware of the Reachability sample code by Apple which is great. But I don't know how to programmatically show this alert or a similar alert, which can take you to the settings app.

neoneye
  • 50,398
  • 25
  • 166
  • 151

1 Answers1

2

You can use flag "Application uses Wi-Fi" instead to have the message with Settings button for plane mode.

On iPad the message would be shown only if plane mode is turn on (no message if Wi-Fi is turn off). On iPhone the message would be shown in both cases - when Plane mode is turn on or when Wi-Fi is turn off.

Updated: For iOs5 you can open settings directly:

 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]];

Update: The URL above works only in ios 5.0

AlexWien
  • 28,470
  • 6
  • 53
  • 83
Tamara
  • 851
  • 11
  • 14