0

Now I'm using this code for showing location settings. But it's a move to the settings screen. I need to show my application location settings options. And I mentioned URL in project TARGET. Please check the

I was tried more but until I didn't get any proper result

#define SYSTEM_VERSION_LESS_THAN(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)

NSString* url = SYSTEM_VERSION_LESS_THAN(@"10.0") ? @"prefs:root=LOCATION_SERVICES" : @"App-prefs:root=Privacy&path=LOCATION_SERVICES";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: url]];

I want to move to direct my application Location setting screen. But it is going to setting screen only.

Please check this image I mentioned pref in project targect :

enter image description here

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

1

The method which you are trying is deprecated since iOS 8.0. You have to use UIApplicationOpenSettingsURLString method which directly open App Settings page.

Pratik Patel
  • 1,393
  • 12
  • 18