2

I'm sure this is a silly error on my behalf.

Using Permission_handler to request camera permissions on iOS.

On first attempt the dialog shows requesting permission and successfully approves or denies. However, if I deny the request first and try launching the camera again there is no dialog requesting permissions.

  static Future<bool> checkCameraPermissions() async {
    PermissionStatus status = await Permission.camera.status;
    if (status.isUndetermined || status.isDenied) {
      print('cam is denied or undetermined');     //Prints
      PermissionStatus newStatus = await Permission.camera.request();
      print(await Permission.camera.isDenied);     //Prints 'true' immediately
      if (newStatus.isDenied)
        return false;
      print('cam is approved!');    //Nope QQ
    }
    return true;
  }

How do I force Permission_handler to request the user again?

Maksym Moros
  • 499
  • 7
  • 21

1 Answers1

2

According to Apple, the user response is stored and the dialog doesn't open again. You can read more about it over here

What you can do is show a dialog with steps to enable required permissions and open settings page.

Shubham Gupta
  • 1,917
  • 1
  • 10
  • 16