CLLocationManager startUpdatingLocation not calling locationManager:didUpdateLocations: or locationManager:didFailWithError:

前端 未结 8 1734
囚心锁ツ
囚心锁ツ 2020-12-05 06:21

I\'m trying to use the CLLocationManager framework in my iOS project to access the user\'s location but when I call

[locationManager startUpdat         


        
8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 07:19

    With iOS 8.0 you need to call -[CLLocationManager requestWhenInUseAuthorization ] or -[CLLocationManager requestAlwaysAuthorization] first so the user gets asked to give your app permission to use the location.

提交回复
热议问题