ios - Ionic iOS App store 上传错误 NSPhotoLibraryUsageDescription Key

标签 ios cordova ionic2 app-store

我开发了一个 Ionic 2 应用程序。当我尝试将它上传到 Apple 商店时,他们拒绝了它并显示以下消息:

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

我在 config.xml 中添加了 NSPhotoLibraryUsageDescription

<plugin name="cordova-plugin-camera" spec="https://github.com/apache/cordova-plugin-camera">
                <variable name="CAMERA_USAGE_DESCRIPTION" value="App would like to access the camera." />
                <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="App would like to access the library." />
</plugin>

但他们仍然拒绝了具有相同消息的应用程序。我需要在所有插件变量中添加这个键吗?我的意思是我也使用过图像选择器插件。我还需要在此插件中添加此 key 吗?我已经添加了,但他们仍然以同样的错误拒绝了。

最佳答案

对我有用的是更改 config.xml

 <platform name="ios">
    <config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
        <string>You can upload your profile picture using your Photo Library</string>
    </config-file>
    <config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
        <string>You can upload your profile picture using your camera</string>
    </config-file>

关于ios - Ionic iOS App store 上传错误 NSPhotoLibraryUsageDescription Key,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43132305/

相关文章:

javascript - 无法在 Windows 8 平板电脑中上传文件

ios - Wistia 视频未出现在 iOS 上的 Phonegap 应用程序中

angular - 使用 Angular2/Ionic2 删除 Firebase 用户

iphone - 即使没有与 UIViewController 关联的 Nib ,也会调用 _loadViewFromNibNamed

iOS - 使用隐藏式字幕的 AVPlayer

ios - 如何在 TableView 中查找已编辑文本字段的索引

JavaScript,将函数插入数组

css - 在 ionic 中实现半星

java - ionic 3 : UnhandledPromiseRejectionWarning when generating APK File

ios - 如何关闭 Apple Watch 扩展的自动安装?