【问题标题】:Rejected react native iOS app due to Missing Purpose String in Info.plist File from appstore由于 Appstore 的 Info.plist 文件中缺少目的字符串而被拒绝响应本机 iOS 应用
【发布时间】:2019-05-05 11:24:12
【问题描述】:

由于info.plist 文件中缺少目的字符串,我从 appstore 收到以下邮件。

这是一个同时支持 iOS 和 Android 的 React Native 应用程序。

我的应用没有请求访问用户的日历。

我认为只有在您实际请求权限时才必须提供描述,或者即使我从未请求查看用户日历,这些描述也是强制性的。

Info.plist 文件中缺少用途字符串 - 您的应用代码引用了一个或多个访问敏感用户数据的 API。应用的 Info.plist 文件应该包含一个 NSCalendarsUsageDescription 键和一个面向用户的目的字符串,清楚而完整地解释为什么你的应用需要数据。从 2019 年春季开始,所有提交到 App Store 并访问用户数据的应用都需要包含目的字符串。如果您使用的是外部库或 SDK,它们可能会引用需要目的字符串的 API。虽然您的应用可能不使用这些 API,但仍需要使用目的字符串。您可以联系库或 SDK 的开发人员,并要求他们发布不包含 API 的代码版本。了解更多信息 (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy)。

【问题讨论】:

  • Apple 审查了您的应用,发现它引用了日历框架。您需要一个字符串来解释您的应用程序如何使用日历,或者您需要删除对框架的引用(可能在您使用过的模块中)
  • 您必须提及为什么应用程序请求访问用户的日历数据。例如:如果您想在用户日历上的特定日期添加提醒,请在 info.plist 中提及相同的内容,例如 Please allow appName to access your calendar to add a reminder.

标签: ios iphone react-native app-store


【解决方案1】:

有时,您安装的软件包会引用您并不真正需要的 API。例如,react-native-permissions 执行此操作,您必须为其使用的所有 API 添加使用说明。

react-native-permissions 包在这里解释了这一点:https://github.com/yonahforst/react-native-permissions#app-store-submission-disclaimer

如果您需要将您的应用程序提交到 AppStore,您需要将所有 *UsageDescription 键添加到您的 Info.plist 中,并带有一个字符串值,向用户解释应用程序如何使用这些数据。即使你不使用它们。

这是 Info.plist 文件的示例:

<key>NSBluetoothPeripheralUsageDescription</key>
<string>Some description</string>
<key>NSCalendarsUsageDescription</key>
<string>Some description</string>
<key>NSCameraUsageDescription</key>
<string>Some description</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Some description</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Some description</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Some description</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Some description</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Some description</string>
<key>NSAppleMusicUsageDescription</key>
<string>Some description</string>
<key>NSMotionUsageDescription</key>
<string>Some description</string>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-04-24
    • 2017-12-30
    • 2019-09-23
    • 1970-01-01
    • 2019-01-30
    • 2020-04-23
    • 2019-04-28
    相关资源
    最近更新 更多