[英]Missing Purpose String in Info.plist for Photo access
I am getting this response when submitting my app to the store.将我的应用程序提交到商店时,我收到此响应。
*ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. *ITMS-90683:Info.plist 中缺少目的字符串 - 您的应用程序代码引用了一个或多个访问敏感用户数据的 API。 The app's Info.plist file should contain a NSPhotoLibraryUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data.
应用的 Info.plist 文件应该包含一个 NSPhotoLibraryUsageDescription 键和一个面向用户的目的字符串,清楚而完整地解释为什么你的应用需要数据。 Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string.
从 Spring 2019 开始,所有提交到 App Store 并访问用户数据的应用都必须包含目的字符串。 If you're using external libraries or SDKs, they may reference APIs that require a purpose string.
如果您使用的是外部库或 SDK,它们可能会引用需要目的字符串的 API。 While your app might not use these APIs, a purpose string is still required.
虽然您的应用可能不使用这些 API,但仍需要使用目的字符串。 You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs.
您可以联系库的开发人员或 SDK 并请求他们发布不包含 API 的代码版本。
The following image shows what I have in the info.plist file.下图显示了我在 info.plist 文件中的内容。 I do not understand where the issue is?
我不明白问题出在哪里?
You added NSPhotoLibraryAddUsageDescription
key to your plist file.您将
NSPhotoLibraryAddUsageDescription
键添加到您的 plist 文件中。 At least that's what your screen shot says.至少这就是你的屏幕截图所说的。
NSPhotoLibraryAddUsageDescription
is the write-only access to the Photos app. NSPhotoLibraryAddUsageDescription
是对照片应用程序的只写访问。 On the other hand, if you would like to request the read or write access to the Photos app, use this key: NSPhotoLibraryUsageDescription
另一方面,如果您想请求对照片应用程序的读取或写入权限,请使用此键:
NSPhotoLibraryUsageDescription
Here's a screenshot of both keys in Info.plist when viewed as a property list file on Xcode:以下是在 Xcode 上作为属性列表文件查看时 Info.plist 中两个键的屏幕截图:
The first one is the
NSPhotoLibraryAddUsageDescription
and the second one is the NSPhotoLibraryUsageDescription
key.第一个是
NSPhotoLibraryAddUsageDescription
,第二个是NSPhotoLibraryUsageDescription
键。
So, if you have any code (or a library) that is trying to read from the photo library, then you are required to add the NSPhotoLibraryUsageDescription
key.因此,如果您有任何代码(或库)试图从照片库中读取,则需要添加
NSPhotoLibraryUsageDescription
键。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.