I know the property locationServicesEnabled is deprecated in iOS 4. Instead, I should call locationServicesEnabled
In my app delegate method
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//Some Code Here...
CLLocationManager *manager = [[CLLocationManager alloc] init];
if (![manager locationServicesEnabled])
{ //show an alert
}
}
I called the method, however, Xcode showed me a warning "locationServicesEnabled is deprecated". Anyone knows how to fix this? Because of the warning, if I turned off the location service in system preference, the alert view can't show.
Thanks!