由于缺少隐私访问描述,iTunes connect 在上传后拒绝了我的应用程序

iTunes connect rejects my App after uploading because of missing privacy-access descriptions

我想将我的应用程序上传到 iTunes connect,但在上传后我总是收到一条来自 iTunes 的邮件错误消息,在他们扫描后一些描述变量丢失。

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.

我正在使用这两个功能,所以没关系,但是:我已经将这些变量添加到我的本地化 infoPlist.strings。这些似乎有效,因为在模拟器和我的 iPhone 中,两个字符串都在系统对话框中正确显示。我没有将字符串添加到 plist.info 文件中,因为我在本地化文件中指定了它们,这应该没问题。 plist.info和本地化文件都打包在应用程序中,我已经用Finder看了一眼。

我还有什么要补充的吗?尽管它们在本地化文件中,但我是否仍需要将它们添加到 plist.info 文件中?

附加信息:我在 macOS Safari 上使用最新的 XCode 8 GM build。

您在使用 AdMob 吗?如果是这样,答案是 Google 确认这是 AdMob SDK 的问题。你可以阅读它 here.

解决方案是,将密钥也添加到 PList.info 文件,而不仅仅是本地化的 infoPlist.strings 文件。 这有点不合时宜,因为在模拟器和我的 phone 上,每条消息都正确显示。但是现在我的应用程序被接受了。