问题描述:
iOS开发时,当使用用户的位置权限时,获取用户经纬度报错:Error Domain=kCLErrorDomain Code=1 "(null)",错误域=kCLError域代码=1"(null)"
解决方法:
打开模拟机的设置-通用-语言与地区
将地区设置为中国(如果你的开发位置在中国的话)

点击左上方Features,选择Location为Custom Location.

再次运行位置请求.发现不再报错,可以找到正确的经纬度.

iOS开发时,当使用用户的位置权限时,获取用户经纬度报错:Error Domain=kCLErrorDomain Code=1 "(null)",错误域=kCLError域代码=1"(null)"
打开模拟机的设置-通用-语言与地区
将地区设置为中国(如果你的开发位置在中国的话)
点击左上方Features,选择Location为Custom Location.
再次运行位置请求.发现不再报错,可以找到正确的经纬度.