LocationServices を有効にする必要があるアプリケーションを実行しています。サービスを呼び出してエラーをキャッチすることで、それらがそうであるかどうかを確認しています。エラーの場合、位置情報サービスを有効にするようにユーザーに通知するアラートビューをポップアップ表示したいと考えています。このテストが行われるとき、私はすでに別の AlertView を開いています。それを閉じて、前述のダイアログ ボックスをユーザーに表示したいと思います。
現在、私は
case kCLErrorDenied: // CL access has been denied (eg, user declined location use)
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"NOTICE"
message:@"Sorry, this application needs your location. Please select 'Allow' when asked to use your current location. You don't need to be on or near the trail."
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"EXIT"];
[alert show];
[alert release];
//exit(0);
break;
これにより、アプリが終了します。そこに NSLog 出力があったので、このケースになることがわかりました。