Request permissions again after user denies location services?

后端 未结 6 1600
耶瑟儿~
耶瑟儿~ 2020-12-05 02:43

I track the user\'s location and ask for permission when my load first loads using this:

locationManager.requestAlwaysAuthorization()
locationManager.startUp         


        
6条回答
  •  隐瞒了意图╮
    2020-12-05 02:47

    The OS will only ever prompt the user once. If they deny permission, that's it. What you can do is direct the user to the Settings for your app by passing UIApplicationOpenSettingsURLString to UIApplication's openURL: method. From there, they can re-enable location services if they wish. That said, you probably shouldn't be too aggressive about bugging them for the permission.

提交回复
热议问题