【发布时间】:2014-07-16 01:38:15
【问题描述】:
由于以下原因,我的应用更新 (1.1) 被拒绝:
We found that your app uses a background mode but does not include functionality that requires that mode to run persistently.
但我的应用仍然使用 1.0 版中的相同功能。
我做什么: 在位置更新时,我检查新位置是否在特定区域(矩形)内:
- (BOOL)locationInRegion: (CLLocation *) lastLocation {
if ((lastLocation.coordinate.latitude < self.overlayTopLeftCoordinate.latitude && lastLocation.coordinate.latitude > self.overlayBottomLeftCoordinate.latitude) &&
(lastLocation.coordinate.longitude < self.overlayTopRightCoordinate.longitude && lastLocation.coordinate.longitude > self.overlayTopLeftCoordinate.longitude)) {
return YES;
}
return NO;
}
在前台和后台模式下,如果用户在这个区域,我会在 MKMapView 上绘制一个碎屑路径。如果没有,我什么都不做。
需要后台模式 -> 用于位置更新的应用注册在我的 .plist 中
我做错了什么?
我的描述中没有此信息:
继续使用在后台运行的 GPS 可以显着提高 减少电池寿命。
这可能是(唯一的)原因吗?
【问题讨论】:
-
在后台绘制信息?这似乎不是很有用...
-
该应用显示带有自定义主题公园覆盖的地图视图。并在位置更新时在地图上绘制一条碎屑路径,用户可以看到他已经访问过哪个景点..
标签: ios objective-c location core-location cllocationmanager