Whenever an script requests the geolocation using HTML5
's geolocation API, the UIWebView
asks for a permission to use the iOS location services.
This is pretty annoying, specially when you load static HTML
files, it keeps asking the permission for each file, even if the user already granted this permission for the app itself.
Is there a way to prevent it?
I know that on safari the permission for geolocation is based on the domain and I agree on asking for permission when the request is done for a different domain, but shouldn't the UIWebView have the same geolocation permission as the app when loading static HTML or local files?
Am I doing something wrong?
You can always pass the geolocation from your app to the javascript loaded into the WebUIView. Look for 'stringByEvaluatingJavaScriptFromString' in WebUIView?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With