Xcode8 中的 NSPhotoLibraryUsageDescription [英] NSPhotoLibraryUsageDescription in Xcode8

查看:27
本文介绍了Xcode8 中的 NSPhotoLibraryUsageDescription的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:
我尝试向 "NSPhotoLibraryUsageDescription" 键添加一个字符串值.

Update:
I attempt to add a String value to the "NSPhotoLibraryUsageDescription" key.

它有效.我的构建版本现在可以在我的 TestFlight 上使用.

And it works.My build version is now available on my TestFlight.

ps:构建版本表示构建版本

但我想知道为什么 Apple Store 只让我为 "NSPhotoLibraryUsageDescription" 键添加字符串值而不是 "Camera Usage Description""Location When使用中 使用说明"?以及如何本地化 info.plist.<小时>:
我已将许多构建版本上传到 iTunes Connect.但 TestFlight 未显示这些构建版本.
然后我在stackoverflow上搜索这个问题.我知道这是由使用说明引起的.我在 Info.plist 中添加了 NSPhotoLibraryUsageDescription.但是,Apple Store 团队通过电子邮件告诉我:

But I want to know why Apple Store just let me add String value for "NSPhotoLibraryUsageDescription" key rather than "Camera Usage Description" or "Location When In Use Usage Description"? And how to localize the info.plist.


Old:
I've uploaded many build versions to iTunes Connect.But TestFlight shows none of these build versions.
Then I search this issue on stackoverflow. And I know this is caused by usage description. I add the NSPhotoLibraryUsageDescription in my Info.plist. However, Apple Store team email and tell me that:

亲爱的开发者:

我们发现您最近为Family Health Tracker"配送的商品存在一个或多个问题.要处理您的交付,必须更正以下问题:

We have discovered one or more issues with your recent delivery for "Family Health Tracker". To process your delivery, the following issues must be corrected:

此应用尝试在没有使用说明的情况下访问隐私敏感数据.应用程序的 Info.plist 必须包含一个 NSPhotoLibraryUsageDescription 键和一个字符串值,向用户解释应用程序如何使用这些数据.

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.

一旦这些问题得到纠正,您就可以重新交付更正后的二进制文件.

Once these issues have been corrected, you can then redeliver the corrected binary.

问候,

App Store 团队

The App Store team

他们仍然告诉我添加 NSPhotoLibraryUsageDescription

推荐答案

info.plist 文件的本地化可能非常无用,尤其是当您在应用程序中使用多种语言时.本地化 NSPhotoLibraryUsageDescriptionNSLocationWhenInUseUsageDescriptionNSCameraUsageDescription 键的最简单方法是在 InfoPlist.strings 文件中对其进行描述.

Localizing of info.plist file may be very unuseful, especially if you use many languages in your apps. The simplest way for localizing NSPhotoLibraryUsageDescription, NSLocationWhenInUseUsageDescriptionor NSCameraUsageDescription keys is to describe it in InfoPlist.strings file.

  • 创建新的 *.strings 文件,名称为 InfoPlist;
  • 在文件检查器中按Localize...按钮并选择默认语言;
  • 在新的 InfoPlist.strings 文件中添加新记录.例如英文:
  • Create new *.strings file with name InfoPlist;
  • Press Localize... button in file inspector and choose the default language;
  • Add new records in your new InfoPlist.strings file. For example in English:

NSLocationWhenInUseUsageDescription = "位置使用说明";

NSLocationWhenInUseUsageDescription = "Location usage description";

NSPhotoLibraryUsageDescription = "照片使用说明";

NSPhotoLibraryUsageDescription = "Photos usage description";

NSCameraUsageDescription = "相机使用说明";

NSCameraUsageDescription = "Camera usage description";

有关更多信息 Apple 文档

这篇关于Xcode8 中的 NSPhotoLibraryUsageDescription的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆