码迷,mamicode.com
首页 > 移动开发 > 详细

IOS8解决获取位置坐标信息出错(Error Domain=kCLErrorDomain Code=0)(转)

时间:2015-07-02 19:25:55      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:

标题:IOS8解决获取位置坐标信息出错(Error Domain=kCLErrorDomain Code=0) 

前几天解决了在ios8上无法使用地址位置服务的问题,最近在模拟器上调试发现获取位置坐标信息的时候会报错,错误信息: didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLErrorDomain error 0.)”。

出错原因是xcode里面的project-->scheme-->edit scheme-->options-->core location-->allow location simulation配置错误;如下图:

技术分享

解决办法:

1. 若已经设置了,取消勾选,保存;

2. 将simulator-->reset content and settings:

3. 再重新勾选allow location simulation,

4. 再reset content and settings

 

这样应该就可以解决该问题了。

IOS8解决获取位置坐标信息出错(Error Domain=kCLErrorDomain Code=0)(转)

标签:

原文地址:http://www.cnblogs.com/yaoliang11/p/4616734.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!