[英]Location Manger Error: The operation couldn’t be completed. (kCLErrorDomain error 0.)
While running my code into device, I'm not able to getting device current location. 将代码运行到设备中时,无法获取设备的当前位置。
-(void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
method called. 方法调用。 I'm not able to getting device locations while device is in motion.
设备移动时,我无法获取设备位置。
In iOS 8 ownwards by default location services are desabled for a new app you create.So to enable it go to settings->privacy->location services and choose your app from it and make it "always" under allow location services. 在iOS 8中,默认情况下,ownwards会为您创建的新应用禁用位置服务。因此,要启用它,请转到设置->隐私->位置服务,然后从中选择您的应用,并使其在允许位置服务下始终显示。 Thank you
谢谢
1. You have to set default location: 1.您必须设置默认位置:
Debug -> Location
2. you have to clear all data using 2.您必须使用清除所有数据
"iOS Simulator" -> "Reset Content and
Settings....
3. 3。
Then clean the project and run the project.. i hope it will work..:) 然后清理项目并运行该项目..我希望它能工作.. :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.