CLLocationManager didFailWithError:什么错误停止位置更新

时间:2014-02-20 06:12:23

标签: ios cllocationmanager cllocation didfailwitherror

iOS CLLocationManager报告didFailWithError方法中的各种错误: https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CoreLocationConstantsRef/Reference/reference.html#//apple_ref/c/econst/kCLErrorDenied

在文档中,不清楚哪些错误(kCLErrorDeniedkCLErrorLocationUnknown除外)会停止位置管理器和位置更新?

此致

1 个答案:

答案 0 :(得分:0)

尝试打印错误对象说明。你会知道失败的原因是什么。可能的原因可能是您未授予对应用使用位置的权限,也未手动撤销使用位置。

如果您在模拟器中失败,请确保模拟器指向某个自定义位置。