错误: Error Domain=kCLErrorDomain,The operation couldn’t be completed
2016-04-12 17:15
393 查看
错误
在模拟器上调试发现获取位置坐标信息的时候会报错,错误信息: 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
方案二
在模拟器的 debug -> location 中选择 None, 然后再重新改回 Custom Location 并给定好坐标, 这个方法就省时省力了, 不用频繁的重启模拟器了.相关文章推荐
- AI - Ideas
- servlet过滤器链FilterChain
- FOJ Problem 2216 The Longest Straight
- 【mdadm】将任何块设备做成RAID
- diff 命令 expain
- 关于中国人工智能学会的分支机构改革与面向未来的几个问题
- uva 10245 The Closest Pair Problem
- 【tail】查看文件后n行
- mfcs100d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
- 配置View桌面时找不到域的解决方法
- “RegSvr32 failed with exit code 0x3”问题的解决办法
- 清华教授谈人工智能:BAT还算不上伟大公司
- log4j启动时警告:SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
- Foxmail设置Gmail邮箱
- HashSet---Contains Duplicate
- CodeForces 606C--Sorting Railway Cars,思路题~~~
- AIX 操作系统安装
- AIX 安装标准
- poj 3691 DNA repair AC自动机+DP
- U-Mail反垃圾邮件网关过滤Locky勒索邮件