react-native - react-native-permissions 和 expo-permissions 之间是否有任何权衡?
问题描述
我正在尝试为我的项目在 react-native-permissions 或 expo-permissions 之间进行选择。它们都适用于 iOS 和 Android,但 expo-permissions 代码更简洁。除此之外,我应该注意两者之间的权衡吗?
我正在使用没有 Expo 的裸反应原生工作流程。
解决方案
如果您使用的是裸 react-native 工作流,则应使用 react-native-permissions,因为 expo-permissions 仅适用于 expo 托管工作流。
虽然 Expo 有react-native-unimodules包,可以给你权限模块。
如果您阅读了有关expo-permissions的文档,您可以在安装指南中看到这个东西。谢谢
推荐阅读
- c - 错误:生成多个输出文件时无法指定 -o
- salesforce - 如何在 Salesforce 中使用 sql 查询关闭机会和关闭谁?
- elasticsearch - 我可以在 kibana 中创建一个插件,在 kibana 仪表板内的小部件菜单中为我提供“下载为 csv 选项”吗?
- r - 根据条件替换字符串中的匹配模式
- c - mq_open 的 oflag 参数不反映创建的 mqueue 文件的实际访问位
- jquery - Videojs - 如何在控制栏中添加自定义图标
- sockets - 将图像从 b4a 客户端发送到 Delphi 服务器
- javascript - 2 在对象中的数组值上选择过滤器
- r - 如果时间在特定时间间隔内,则创建指标变量
- reactjs - 悬停日期 - react-dates 库