【解决方法】Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed.

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhyl8157121/article/details/40112919


环境:XCODE6.0.1 + iPhone / iOS8


错误:使用CoreLocation获取地理位置信息,报错

Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"


解决方法:

1.确定模拟器(手机)已经联网并且允许程序获取地理位置

2.重置地理位置服务或者网络服务


PS:如果是模拟器就果断直接重置模拟器吧  IOS Simulator - Reset Content and Settings..。

猜你喜欢

转载自blog.csdn.net/zhyl8157121/article/details/40112919