IOS development of small notes | versions to jump to the location service page

IOS development of small notes | versions to jump to the location service page
IU

Do positioning related functions, here to record, have pro test, perfect response to iOS8 910.


IOS10 can be used before:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@ "App-Prefs:root=Privacy& path=LOCATION"; ";

The above method is abolished at iOS10:

IOS development of small notes | versions to jump to the location service page

so iOS10 should be used this way later:

[[UIApplication, sharedApplication]openURL:[NSURL, URLWithString:@, App-Prefs:root=Privacy&, path=LOCATION,] options:[NSDictionary, dictionary], completionHandler:nil];

Full use method:

NSString *systemVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@ "CFBundleShortVersionString"]; if (systemVersion.floatValue < 10) [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@ {App-Prefs:root=Privacy& amp; path=LOCATION}else{[[UIApplication sharedApplication]openURL:[NSURL ";" URLWithString:@ "App-Prefs:root=Privacy& path=LOCATION" options:[NSDictionary dictionary] completionHandler:nil];}