我的应用需要用户的当前位置,以向他显示前往谷歌地图中特定位置的方向
以下是在Web视图上显示位置的代码 -
[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]]]];
该应用程序在.plist文件中声明支持位置服务,使用 NSLocationAlwaysUsageDescription 和 NSLocationWhenInUseUsageDescription。
if([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
[locationManager requestAlwaysAuthorization];
}
[locationManager startUpdatingLocation];
苹果以以下原因拒绝了该应用:
2.16 详情
您的应用在 Info.plist 文件中的 UIBackgroundModes 键中声明支持位置,但仍未声明任何需要持久位置的特性。在 Info.plist 文件的 UIBackgroundModes 键中声明支持位置的应用必须具有需要持久位置的特性。
具体而言,我们注意到“路线”功能不需要持久位置信息,因为它不包括逐步导航。
如果需要帮助,请联系我们,谢谢。