OGeek|极客世界-中国程序员成长平台

标题: ios - 使用 ReactNative 时需要 NSPhotoLibraryUsageDescription 权限(...我认为) [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 18:41
标题: ios - 使用 ReactNative 时需要 NSPhotoLibraryUsageDescription 权限(...我认为)

将 React-Native 构建的 .ipa 上传到 App Store 后,我从 Apple 收到此上传错误:

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

现在,我们的应用程序不使用任何照片库功能,在全局搜索后,我看到的唯一使用 NSPhotoLibraryUsageDescription 的库是 React 中的 CameraRoll 组件- native 。

我假设这个错误是通过简单地包含 RN 来触发的,即使实际上没有使用 CameraRoll。这是正确的假设吗?

如果没有,有没有办法检查是否有任何第三方依赖项?



Best Answer-推荐答案


你需要添加,

<key>NSPhotoLibraryUsageDescription</key>
<string>your description here</string>

进入你的 info.plist

关于ios - 使用 ReactNative 时需要 NSPhotoLibraryUsageDescription 权限(...我认为),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46218941/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4