I have the app in the App Store that is built with SDK 7 and with deployment target 7. The iOS 8 has arrived in the mean time and some users use that app on new iOS. Inside application built with iOS 7 I have this line:
[self.locationManager startUpdatingLocation];
Such function call is integrated with system because the system invokes the authorisation popup and asks user to allow usage of location service. That popup has been removed in iOS 8 and there it should be presented manually by invoking function:
[self.locationManager requestWhenInUseAuthorization];
In my iOS 7 app this function is not available, so, in my old app without this request, will user be prompted to allow location usage or not?
How the iOS apps built with old sdk works on device with newer iOS, I mean, what will happen if old iOS app make a call of function that is not deprecated any more, but totally removed on new iOS?
You will need to check the whether the method is vailable and call it, waiting if the authentication to be given.
You can easily dot it like this:
if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined && [self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) {
[self.locationManager requestWhenInUseAuthorization];
}
else {
[self.locationManager startUpdatingLocation];
}
If you are using the older SDK then 8 your app will work the same a before, but beware that starting feb 2015 Apple requires your app to be build with the iOS 6 SDK and Xcode 6.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments