如何同时在科尔多瓦iOS应用要求许可位置更改警报文本?

问题描述 投票:-1回答:1

有谁知道如何更改请求当前位置的警告框字符串?目前,它显示了整个包名称。

enter image description here

ios cordova cordova-plugins
1个回答
0
投票

我猜你正在使用 - cordova-plugin-geolocation。对于这一点,下面添加一行在config.xml

<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge"> <string>AppName would like to use your location.</string> </edit-config>

要么

删除插件:cordova plugin remove cordova-plugin-geolocation

再次添加:cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="AppName would like to use your location."

希望这可以帮助。

© www.soinside.com 2019 - 2024. All rights reserved.