How to check if location services are enabled for a particular app prior to iOS 4.2?

后端 未结 3 1345
灰色年华
灰色年华 2020-12-23 16:57

How can I check if the user has allowed location for mu app? Normally I would use authorizationStatus method of the CLLocationManager class, but it

3条回答
  •  情话喂你
    2020-12-23 17:33

    When you call -startUpdatingLocation, if location services were denied by the user, the location manager delegate will receive a call to -locationManager:didFailWithError: with the kCLErrorDenied error code. This works both in all versions of iOS.

提交回复
热议问题