我想知道哪些设备支持地域监控?我知道iPhone 4支持,但是iPad 2支持吗?
此外,文档还建议:
For this reason, Core Location limits the number of regions that may be simultaneously monitored by a single application. 使用此功能可以监控的地域限制是多少?
发布于 2011-03-18 03:32:04
我猜非3G设备目前不支持区域监控:我的测试表明,它完全基于蜂窝-发射塔切换,因此其他定位服务(Wi-Fi和GPS)无法提供这种功能。最好不要把你的代码建立在对特定硬件的假设上: CLLocationManager有一个maximumRegionMonitoringDistance属性,它将在不支持区域监控的设备上返回-1。
发布于 2011-03-17 13:07:56
iPad2使用与iPhone和iPad 1相同的位置框架。它应该可以工作。
我不确定限制是多少。
发布于 2015-09-07 15:12:18
我注意到iPad2(没有sim)和iPod不能成功添加区域。对于iOS8 SDK中不支持地域监控的设备,可以使用以下代码来保护您的监控代码不被运行:
if ([UIDevice currentDevice].systemVersion.integerValue >= 7 &&
![CLLocationManager isMonitoringAvailableForClass:CLRegion.class]) {
return;
}else if(![CLLocationManager regionMonitoringAvailable])
return;https://stackoverflow.com/questions/5334842
复制相似问题