我有一个跟踪用户位置的应用程序。我有很多经验,这和使用授权所要求的时候,并添加了关键我的P列表,但是我仍然收到此错误:IOS Swift用户位置授权
"Trying to start MapKit location updates without prompting for location authorization. Must call -[CLLocationManager requestWhenInUseAuthorization] or -[CLLocationManager requestAlwaysAuthorization] first."
,我使用外景经理不在ViewController
但在另一个班级。
,我想的很多。当我清楚地请求用户授权时,我无法确定为什么仍然收到错误消息。 – loadedjd
尝试设置一个断点(或使用'print'或'NSLog')来确定哪些被首先调用...导致这些错误消息触发的授权方法或MapKit方法。 –