我开发了一个 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/