Wednesday, May 2, 2018

Double message on ios when get geolocation

Leave a Comment

I have created an ios app (Xcode) with a single WebKit View component that loads an external website. This website tries to get the current geolocation with this Javascript: navigator.geolocation.

This all works fine, but the problem is, I get 2 messages:

  1. First a message for the app: 'Allow "NameApp" to access your location while you are using the app?'
  2. Second a message for the webview: 'https://mywebsite.com would like to use your current location'.

I have seen similar questions about this issue, but they all went about a native/offline Cordova app. I have an online app in my Webview.

How can I prevent this double message? Or a workaround for this problem?

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment