ios - 由于应用商店中的 Info.plist 文件中缺少目的字符串而被拒绝 react native iOS 应用

标签 ios iphone react-native app-store

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

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

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

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

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSCalendarsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. 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. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

最佳答案

有时,您安装的软件包会引用您并不真正需要的 API。例如,react-native-permissions就是这样做的,你必须为他们使用的所有API添加一个使用说明。

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

If you need to submit you application to the AppStore, you need to add to your Info.plist all *UsageDescription keys with a string value explaining to the user how the app uses this data. Even if you don't use them.

这是您的 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>

关于ios - 由于应用商店中的 Info.plist 文件中缺少目的字符串而被拒绝 react native iOS 应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53606087/

相关文章:

ios - 如何使用 class-dump 查找您的 iOS 应用程序在何处使用私有(private)内容

iOS - 为什么表格 View 不显示?

javascript - 使用三元表达式渲染组件

javascript - 在子更改事件 Firebase 上更新 react native ListView

ios - AVPlayerItemDidPlayToEndTimeNotification 未触发

ios - UIScrollView 分页插入不工作

ios - 如何在 tableviewcell swift 3 中添加阴影?

javascript - iOS 移动应用程序和 Node.js 网络应用程序 AES 256 加密

ios - 错误编译 alamofire - : -Xlinker 中的未知选项字符 `X'

javascript - 'expo' 不被识别为内部或外部命令