如何删除cordova上的ios地理位置验证请求消息

如何删除cordova上的ios地理位置验证请求消息,ios,cordova,authentication,geolocation,Ios,Cordova,Authentication,Geolocation,我正在使用Cordova制作一个应用程序 Cordoba中的某些页面(index.html)请求位置权限,这是函数的权限 在修改Xcode中的plist以获得位置权限后,我一直收到以下消息 这是我的设置和出现的消息 我寻找了一个解决方案来解释为什么会出现这个消息(/private/var/containers/Bundle/Application…/www/index.html Geolocation auth),但没有找到正确的答案。我该怎么办?您需要安装(cordova插件添加cordo

我正在使用Cordova制作一个应用程序

Cordoba中的某些页面(index.html)请求位置权限,这是函数的权限

在修改Xcode中的plist以获得位置权限后,我一直收到以下消息

这是我的设置和出现的消息

我寻找了一个解决方案来解释为什么会出现这个消息(/private/var/containers/Bundle/Application…/www/index.html Geolocation auth),但没有找到正确的答案。我该怎么办?

您需要安装(cordova插件添加cordova插件地理位置),然后在config.xml中为iOS设置首选项,例如

    <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
        <string>need to access your location for reasons</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysAndWhenInUseUsageDescription">
        <string>need to access your location for reasons</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
        <string>need to access your location for reasons</string>
    </edit-config>

由于某些原因需要访问您的位置
由于某些原因需要访问您的位置
由于某些原因需要访问您的位置
当然是编辑

由于某些原因需要访问您的位置