locationServicesEnabled changed from a property to a method.
This is deprecated:
CLLocationManager *manager = [[CLLocationManager alloc] init];
if (manager.locationServicesEnabled == NO) {
// ...
}
Now I should use:
if (![CLLocationManager locationServicesEnabled]) {
// ...
}
I want to support iOS 3 and iOS 4 devices. How can I check this on iOS 3 devices and get rid of the deprecated warning?