由于 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/