简体   繁体   English

位置管理器错误:操作无法完成。 (kCLErrorDomain错误0。)

[英]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.

相关问题 更新位置时出错 操作无法完成。 (kCLErrorDomain 错误 0。) - Error while updating location The operation couldn’t be completed. (kCLErrorDomain error 0.) didFailWithError:错误域= kCLErrorDomain代码= 0“无法完成操作。 (kCLErrorDomain错误0。)“ - didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLErrorDomain error 0.)” 错误:该操作无法完成。 (LaunchServicesError错误0。) - Error: The operation couldn’t be completed. (LaunchServicesError error 0.) 错误域=kCLErrorDomain 代码=2“操作无法完成。(kCLErrorDomain 错误 2。)” - Error Domain=kCLErrorDomain Code=2 "The operation couldn’t be completed. (kCLErrorDomain error 2.)" kCLErrorDomain Code=8 "操作无法完成。 - kCLErrorDomain Code=8 "The operation couldn’t be completed. CLGeocoder 返回错误:操作无法完成。 (kCLErrorDomain 错误 8。) - CLGeocoder returning error : The operation couldn’t be completed. (kCLErrorDomain error 8.) CLLocationManager: allowDeferredLocationUpdates - 不断获取操作无法完成。 (kCLErrorDomain 错误 11。) - CLLocationManager: allowDeferredLocationUpdates - keep getting The operation couldn’t be completed. (kCLErrorDomain error 11.) Xcode10:操作无法完成。 (DVTCoreSimulatorAdditionsErrorDomain 错误 0。) - Xcode10: The operation couldn't be completed. (DVTCoreSimulatorAdditionsErrorDomain error 0.) 如何修复损坏的iOS模拟器(操作无法完成。LaunchServicesError错误0。) - How to fix a broken iOS Simulator (The operation couldn’t be completed. LaunchServicesError error 0.) 无法在模拟器上运行应用程序“操作无法完成。 (LaunchServicesError错误0。)” - Cant run app on simulator “The operation couldn’t be completed. (LaunchServicesError error 0.)”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM