環境: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..。