delba / Permission

A unified API to ask for permissions on iOS
MIT License
2.9k stars 320 forks source link

Location Permission on iOS 14 #155

Open zhongxunchao opened 3 years ago

zhongxunchao commented 3 years ago

Our tester told me a crazy bug and I found the repro steps as: Precondition: My app has 2 pages-A and B. And while the user clicks the button in page A, the app should direct to page B. And in the function “viewDidLoad” of page B, the location permission is asked. Steps:

  1. Set the location permission of my app to “Never”, and the app has not launched;
  2. Open the app, skip to page B and ask for the location permission, set it to “Ask Next Time”; and return to my app; then the app backs to page A automatically;
  3. Skip to page B again, and the popup ask you to allow the permission, select “Not Allowed”; then it backs to page A;
  4. Skip to page B again, and the app reminds the user to skip to system settings to change the permission; then change it to “Ask Next Time”;
  5. Skip to page B again, and set the system pop to “Not Allowed”, then I found no callback this time.
zhongxunchao commented 3 years ago

I have found a solution of the bug,but not sure whether it may cause other issues. image