【问题标题】:Requirements for accessing and using ImagePicker in React Native w/ Expo在带有 Expo 的 React Native 中访问和使用 ImagePicker 的要求
【发布时间】:2020-09-29 04:38:21
【问题描述】:

我目前正在使用最新版本在 React Native 中使用 Expo 制作应用程序。我正在使用 Expo Library ImagePicker 访问相机和相机胶卷。

我是否需要在 App.json / Config 中为相机和相机胶卷添加 Android 和 iOS 所需的权限,或者以下运行时代码检查是否足够?

以下内容是否足以获得 Apple App Store 和 Google Play 的批准?

// Asks the user for permission at runtime
ImagePicker.requestCameraRollPermissionsAsync()
ImagePicker.requestCameraPermissionsAsync()

【问题讨论】:

    标签: javascript reactjs react-native expo


    【解决方案1】:

    不,您不需要在App.json 文件中定义这些权限,当您安装此模块时,expo 将处理这些权限。

    【讨论】:

    • 太棒了!谢谢!如果允许,我会在 4 分钟内接受它:)
    猜你喜欢
    • 2020-03-02
    • 2020-07-11
    • 1970-01-01
    • 1970-01-01
    • 2018-03-26
    • 1970-01-01
    • 1970-01-01
    • 2021-07-12
    • 1970-01-01
    相关资源
    最近更新 更多