Ionic ://希望使用您的当前位置

yacmzcpb  于 2022-12-08  发布在  Ionic
关注(0)|答案(3)|浏览(197)

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:

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.

w8f9ii69

w8f9ii691#

这是一个WKWebView错误,您应该将其报告给WebKit团队,它应该显示您的应用程序的名称,但它不是https://bugs.webkit.org/
您可以使用Geolocation插件代替Web地理定位

au9on6nz

au9on6nz2#

该问题与您用于获取地理位置的插件有关。
使用Angular
我换了
从:从'@ionic-native/地理位置/ngx'导入{地理位置};
到:导入{地理位置}从'@ awesome-cordova-plugins/地理位置/ngx';
所以,一个插件的变化为我工作!

rqenqsqc

rqenqsqc3#

假设你使用的是地理定位插件,你需要根据指南修改Info.plist中的隐私描述。

NSLocationAlwaysUsageDescription
NSLocationWhenInUseUsageDescription

相关问题