Breaking News
Home / iOS / iOS Snippets / How to check if LBS is enabled in IOS?

How to check if LBS is enabled in IOS?

Snippet

BOOL locationServicesEnabled;

CLLocationManager locationManager = [CLLocationManager new];

if( [locationManager respondsToSelector:@selector(locationServicesEnabled) ] )

   locationServicesEnabled = [locationManager locationServicesEnabled];

}

else

   locationServicesEnabled = locationManager.locationServicesEnabled;

}

[pb_builder]

Check Also

EKCalendar – That account does not allow calendars to be added or removed

Usecase When I am trying to create a new Calendar programmatically using the EventKit API …

Advertisment ad adsense adlogger