info.plist 中提供了 NSPhotoLibraryUsageDescription,但苹果仍然要求提供一个

NSPhotoLibraryUsageDescription supplied in info.plist but apple still asks for one

在我第一次从 Xcode 8 上传到 iTunes Store 时,我收到了来自 Apple 的以下消息

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.

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

我进行了研究,然后将以下条目添加到我的 info.plist

然后我将新版本上传到 iTunes 商店,但再次收到相同的警告电子邮件。

我做错了什么?

编辑

我添加了媒体库使用说明(如下文 Dan Clark 所建议)

但 apple 再次拒绝了构建并回复了完全相同的警告电子邮件。

还有一个媒体库使用说明条目,您需要将其添加到 PList。

好吧,原来我在Xcode的左侧文件列表中编辑的info.plist并不是Xcode在identities下引用的plist。它引用了备份文件夹中的 info.plist。

所以使用说明键从来没有问题。

单击屏幕左上角附近的 "show the find navigator" 图标。

在搜索栏中输入 "info.plist"

点击“TrackerTest/info.plist

转到"Info"

将指定的目标添加到 iOS 目标属性。

比如隐私-图片库使用说明,带字符串。

确保您正在更新项目文件夹中的正确 info.plist 文件,因为项目中有几个不同的 info.plist 文件(测试、UITest...)