有时候,你安装的软件包会引用你并不真正需要的api。例如,
react-native-permissions
这样做,您必须为它们使用的所有api添加使用说明。
这个
反应本机权限
包在此解释:
https://github.com/yonahforst/react-native-permissions#app-store-submission-disclaimer
如果需要将应用程序提交到AppStore,则需要向Info.plist all*UsageDescription key添加一个字符串值,向用户解释应用程序如何使用此数据。即使你不使用它们。
这是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>