あなたは一つのことをすることができます。
アプリケーションが読み込まれ、カスタムメッセージが表示されている間に、アプリケーションの位置情報サービスの設定を確認するだけです。
#import <CoreLocation/CoreLocation.h>
-(void)showAlertForLocationServiceEnabled{
BOOL locationAllowed = [CLLocationManager locationServicesEnabled];
if (locationAllowed == NO) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location Service Disabled!!!"
message:@"Location Services is required for this application. Please enable Location Services"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
}
}
また
-(void)checkAndNotifyLocationServiceAvailable{
if (! ([CLLocationManager locationServicesEnabled]) || ( [CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied)){
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location Service Disabled!!!" message:@"Location Services is required for this application. Please enable Location Services" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
}