Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Binary Rejected (2.16)

My app requires users current location to show him direction to a particular location in google map

Below is the code to show location on web view-

[self.getDirectionsWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f",currentLocation.coordinate.latitude,currentLocation.coordinate.longitude,self.projectLatitude,self.projectLongitude]]]];

The app declares support for location in .plist by using NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription

if([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
        [locationManager requestAlwaysAuthorization];
    }
    [locationManager startUpdatingLocation];

Apple rejected the app with following reason

2.16 Details

Your app declares support for location in the UIBackgroundModes key in your Info.plist file but still does not declare any features that require persistent location. Apps that declare support for location in the UIBackgroundModes key in your Info.plist file must have features that require persistent location.

Specifically, we noticed that the Directions feature does not require persistent location information, since it does not include turn-by-turn navigation.

Any help will be appreciated, Thanks in Advance.

like image 684
Yogesh S Vankudre Avatar asked Dec 04 '22 04:12

Yogesh S Vankudre


1 Answers

You just remove the location support from UIBackgroundModes key in info.plist

As you must only use UIBackgroundModes for location when you want to fetch location when your app is in background.

In your app declaration of NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription is enough.

like image 62
Pankaj Yadav Avatar answered Dec 17 '22 04:12

Pankaj Yadav