iosobjective-clocation-services

How to open Location services screen from setting screen?


I want to open location service screen programmatically to turn on service.

enter image description here


Solution

  • Step 1: Click on project name >> target>> info >> url Types

    enter image description here

    Step 2:

    -(IBAction)openSettingViewToEnableLocationService:(id)sender
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];
    }