Possible Duplicate:
Determining if Airplane Mode is enabled on an iPhone?
My application is using the GPS, and I check its availability with :
if([CLLocationManager locationServicesEnabled] && [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized){
[locationManager startUpdatingLocation];
}
My problem is that if the user turns on airplane mode, these methods don't detect that the GPS is unavailable, and it ends with errors.
I try to add SBUsesNetwork in my plist file, but without success.
I found some threads talking about Reachability (that I use to check the internet connection), but it is not an option since the user can disable his connection to internet (a tourist, e.g) but still want GPS location ?
How can I know if the airplane mode is activated ?