ios - 应用程序的 Info.plist 必须包含 NSLocationAlwaysUsageDescription 和 NSLocationWhenInUseUsageDescription。

标签 ios cordova app-store-connect phonegap-build

我在 iTunes connect 中构建 ipa 文件时遇到问题。

如何解决这个问题我正在通过 PhoneGap Build 构建 apk。

这是我面临的问题

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSLocationAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSLocationWhenInUseUsageDescription key with a string value explaining to the user how the app uses this data.

最佳答案

我已经尝试过这两种可行的解决方案。现在可以使用了

 <plugin name="cordova-plugin-geolocation">
         <variable name="LOCATION_WHEN_IN_USE_DESCRIPTION" value="App would like to access the location." />
        <variable name="LOCATION_ALWAYS_USAGE_DESCRIPTION" value="App would like to access the location." />
 </plugin>

<plugin name="cordova-custom-config" version="*"/>
<config-file overwrite="true" parent="NSLocationAlwaysUsageDescription" platform="ios" target="*-Info.plist"> <string>Allow the app to know your location</string> </config-file>
<config-file overwrite="true" parent="NSLocationWhenInUseUsageDescription" platform="ios" target="*-Info.plist"> <string>Allow the app to know your location</string> </config-file>

关于ios - 应用程序的 Info.plist 必须包含 NSLocationAlwaysUsageDescription 和 NSLocationWhenInUseUsageDescription。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50388964/

相关文章:

android - Cordova 3.4.0 navigator.camera.getPicture 不回调 Android 4.3 的 onSuccess 或 onFail

ios - 为什么 App Store Connect 中有两个 12.9 英寸大小的屏幕截图选项?

ios - 发布前更改 iTunes Connect 上的 Logo

ios - iOS7 中的 UIToolbar 颜色不正确

ios - ScrollView 中的分段控件

iphone - 如何创建一个带有粗体和普通文本的 UILabel 或 UITextView?

ios - 仪器中的 xcrun 错误

javascript - Phonegap 应用程序未运行 javascript 元素

android - 连接 PhoneGap 与本地主机网络服务

ios - 在 iTunes 连接中出现错误