The App Remembers Location Access Permission only for 24 Hours

We have a PWA app developed by our company. In order to distribute this app to users' iPhones, we put this PWA app inside an XCode app. That means we put a WebView in XCode to display the PWA URL. Everything works perfect, except for location access.

The PWA app access the device location. When the first time the app acess location, it asks for user consent two times, by PWA app and by the XCode app. This is fine. When the user clicks Allow, the XCode app preserves the user choice and never asks again. However, the PWA app keeps on asking user permission every day. If we close the app open again, it will ask one more time. That means twice daily. But if we close and open the app for a third time, it will not ask. It remembers the user choice only for 24 hours.

If we install the PWA app directly in iPhone (that means if we add the URL as bookmark in home screen), it is asking for location permission only once. However, when we put this app inside an XCode app it is asking every day.

This affects the user experience, and as our users are not tech savvy, causing many issues. Is there a way to force the PWA app inside XCode app to remember the user choice?

Any help is very much appreciated.

Thanks,

The App Remembers Location Access Permission only for 24 Hours
 
 
Q