How can I prompt the user to turn on location services after user has denied their use

后端 未结 11 2221
死守一世寂寞
死守一世寂寞 2020-11-29 20:06

I have an application with an explicit user interaction that makes use of the user\'s current location. If the user denies access to location services, I would still like su

11条回答
  •  攒了一身酷
    2020-11-29 20:31

    According to Apple's Docs on the locationServicesEnabled method.

    The user can enable or disable location services from the Settings application by toggling the Location Services switch in General.

    You should check the return value of this method before starting location updates to determine whether the user has location services enabled for the current device. If this method returns NO and you start location updates anyway, the Core Location framework prompts the user to confirm whether location services should be reenabled.

    So cant you just start location services updates any way to cause the alert to be prompted?

提交回复
热议问题