Home > front end >  :// Would Like To Use Your Current Location
:// Would Like To Use Your Current Location

Time:12-15

I am build an mobile app using ionic capacitor. In the webview, I am using javascript:

navigator.geolocation.getCurrentPosition

When the user first time install and open the app, it pop up an alert as below:

enter image description here

Now Apple asked me to change the description :// to be more meaningful.

Please revise the purpose string in your app’s Info.plist file for the location to explain why your app needs access.

You can modify your app's Info.plist file using the property list editor in Xcode.

I tried all location related properties but none of them are changing the description in the alert box.

Ideas/help please.

enter image description here

enter image description here

CodePudding user response:

Assuming you're using the geolocation plugin, you need to change privacy descriptions in Info.plist as per the guide. Look for these two keys:

NSLocationAlwaysUsageDescription
NSLocationWhenInUseUsageDescription

CodePudding user response:

That's a WKWebView bug, you should report it to WebKit team, it's supposed to show the name of your app, but it's not https://bugs.webkit.org/

You can use Geolocation plugin instead of web geolocation

  • Related