我有一個跟蹤用戶位置的應用程序。我有很多經驗,這和使用授權所要求的時候,並添加了關鍵我的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方法。 –