Skip to content

Commit

Permalink
Minor formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
inoshperera committed Mar 20, 2018
1 parent 3fc7a79 commit 2a3fade
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions iOSMDMAgent/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
NSString *message = @"Turn on location services and let the app find device's location when necessery."
"Go to Settings->Privacy->Location and enable.";
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Turn On Location Services"
message:message
delegate:self
cancelButtonTitle:@"Ok"
message:message delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil, nil];
alertView.tag = LOCATION_OFF_CODE;
[alertView show];
Expand Down Expand Up @@ -278,7 +276,8 @@ - (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatu
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if(alertView.tag && LOCATION_OFF_CODE == alertView.tag) {
NSLog(@"Opening location settings");
NSString* url = SYSTEM_VERSION_LESS_THAN(@"10.0") ? @"prefs:root=LOCATION_SERVICES" : @"App-Prefs:root=Privacy&path=LOCATION";
NSString* url = SYSTEM_VERSION_LESS_THAN(@"10.0") ?
@"prefs:root=LOCATION_SERVICES" : @"App-Prefs:root=Privacy&path=LOCATION";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: url]];
} else {
if(buttonIndex == 1) {
Expand Down

0 comments on commit 2a3fade

Please sign in to comment.