Lyokone / flutterlocation

A Flutter plugin to easily handle realtime location in iOS and Android. Provides settings for optimizing performance or battery.
MIT License
1.11k stars 824 forks source link

Can't enable location for site on iPhone with Chrome after blocking initially #878

Open tyler-jewell opened 1 year ago

tyler-jewell commented 1 year ago

Describe the bug I have an edge case with my app that utilizes their location. This is not necessarily a bug with this package, however, wondering if anyone either has a work-around or maybe there is some way we can handle this in the package? I know there are some ways to reset the permission settings for a particular site in JS. Maybe this could help?

Scenario:

  1. User opens web app on Chrome browser on iPhone for the first time.
  2. I ask for permission to location and they accidentally hit block.

From there, I can't find any way to reverse that (or even prompt them again).

I've tried:

Expected behavior Once a user says block site location settings, there is a way to then enable site location settings.

Tested on:

Screen record of Safari:

https://github.com/Lyokone/flutterlocation/assets/72859335/9bdecb00-78e0-45f4-b3bd-f2e158841860

Screen record of Chrome:

https://github.com/Lyokone/flutterlocation/assets/72859335/38f3766b-b4ff-4c1e-9bd6-46e467da9a81

hardythaker commented 6 months ago

Faced same issue on one of the user in our PWA app. I was not able to find how to allow location access for that specific domain anywhere once it has blocked. Eventually asked the user to use safari and download the PWA.

Where you able to find out a way to do it?

kevinle-source commented 1 month ago

We have been dealing with this issue:

There are two permissions, Chrome/App settings accessible in IOS settings and "site settings" your specific site.

The issue my team deals with is on IOS Chrome (location settings allowed), the location site permission whether "allowed" or "disallowed" stays persistent (never prompt again). The issue is even there when only using incognito tabs and clearing all-time cache/browsing/site data. Chrome, for whatever reason doesn't actually clear the site settings (hypothesis: IOS is a bully and doesn't give other apps complete control on site settings). The only way to guarantee the user being prompted again is to have them delete the app and redownload chrome in app store and visit site.

Safari doesn't have this issue because you can directly access site settings. Chrome on android has the ability to directly access site settings as well.