@daily-co/config-plugin-rn-daily-js

中文文档
0.0.13发布于 2026/10/16TypeScriptCommonJS近 30 天下载 7.7万

Config plugin to setup react-native-daily-js on prebuild

原始使用文档
文档目录8 节
  1. Versioning
  2. Expo installation
  3. Install react-native-daily-js dependencies
  4. Install Expo config plugins
  5. Screen Sharing Support
  6. Expo build
  7. Extra customization
  8. Troubleshooting

@daily-co/config-plugin-rn-daily-js

Expo is an open-source framework for apps that run natively on Android, iOS, and the web.

This project cannot be used with an Expo Go app because it requires custom native code. Follow the steps in the article on how to make your own development build or prebuild your native projects.

This plugin will automatically configure your native code when it's generated (e.g. with npx expo prebuild) so that it can be used with react-native-daily-js.

Versioning

Ensure you use versions that work together!

expo@daily-co/react-native-webrtc@config-plugins/react-native-webrtc@daily-co/react-native-daily-js@daily-co/config-plugin-rn-daily-js
57.x124.0.6-daily.2-0.88.00.0.13
56.x124.0.6-daily.2-0.88.00.0.13
55.x124.0.6-daily.1-0.84.10.0.12
54.x124.0.6-daily.1-0.82.00.0.11
53.x124.0.6-daily.1-0.81.00.0.10
53.x118.0.3-daily.2-0.76.00.0.9
52.x118.0.3-daily.210.0.00.76.00.0.8
52.x118.0.3-daily.210.0.00.70.00.0.7
51.x118.0.3-daily.29.0.00.64.00.0.6
50.x118.0.3-daily.28.0.00.59.00.0.5
49.x111.0.0-daily.27.0.00.49.00.0.3
48.x111.0.0-daily.16.0.00.43.00.0.2
47.x1.94.1-daily.85.0.00.36.00.0.1

IMPORTANT: Starting with version 0.0.9, you no longer need to install @config-plugins/react-native-webrtc. You only need to install @daily-co/config-plugin-rn-daily-js.

Expo installation

Tested against Expo SDK 47 This package cannot be used in the "Expo Go" app because it requires custom native code.

Install react-native-daily-js dependencies

Install the react-native-daily-js dependencies as mentioned here.

npm i @daily-co/react-native-daily-js @react-native-async-storage/async-storage@^1.15.7 react-native-background-timer@^2.3.1 expo-random@^13.6.0 react-native-get-random-values@^1.10.0
npm i --save-exact @daily-co/[email protected]

Install Expo config plugins

npm i @config-plugins/react-native-webrtc @daily-co/config-plugin-rn-daily-js

After installing these packages, add the config plugin to the plugins array of your app.json or app.config.js.

  • For iOS you also need to add the voip background permission.
{
  "expo": {
    "ios": {
      "infoPlist": {
        "UIBackgroundModes": [
          "voip"
        ]
      }
    },
    "plugins": [
      [
        "@daily-co/config-plugin-rn-daily-js",
        {
          "enableCamera": true,
          "enableMicrophone": true,
          "enableScreenShare": true
        }
      ],
      [
        "expo-build-properties",
        {
          "android": {
            "minSdkVersion": 24
          },
          "ios": {
            "deploymentTarget": "13.0"
          }
        }
      ]
    ]
  }
}

Screen Sharing Support

Starting with version 0.0.8, the @daily-co/config-plugin-rn-daily-js plugin now supports screen sharing on iOS via the ScreenCaptureExtension.

How to Enable

To enable screen sharing, add the plugin to your app.json with the enableScreenShare property set to true:

[
  "@daily-co/config-plugin-rn-daily-js",
  {
    "enableScreenShare": true
  }
]

If enableScreenShare is not set or is false, the plugin will not attempt to create the ScreenCaptureExtension.

The App Group ID used for screen sharing will follow this format:

  • group.<your_app_bundle_identifier>

It only works with v0.0.8 or above.

Expo build

After installing all the dependencies, rebuild your app as described in the "Adding custom native code" guide.

Extra customization

The @config-plugins/react-native-webrtc provides props for extra customization, for instance, to define the camera and microphone permissions prompt messages. See the plugin API to learn more.

Troubleshooting

Super expression must either be null or a function

  • This issue may happen when using Expo 50 and @daily-co/react-native-webrtc 118.
  • event-target-shim version must match the same one requested by @daily-co/react-native-webrtc: "event-target-shim": "6.0.2".
  • You can check inside package-lock.json to be sure you are using the right version.
  • If your version of event-target-shim doesn't match the one requested by @daily-co/react-native-webrtc, you can try to update running the following: npm update event-target-shim

版本与发布记录

@daily-co/config-plugin-rn-daily-js 共发布 13 个版本,首次发布于 2023/02/17;过去 12 个月发布了 2 个版本。

版本发布日期距今
0.0.13latest2026/10/1626 天前
0.0.122026/04/077 个月前
0.0.112025/10/291 年前
0.0.102025/09/191.1 年前
0.0.92025/06/031.4 年前
0.0.82025/05/171.5 年前

关于 @daily-co/config-plugin-rn-daily-js 的常见问题

@daily-co/config-plugin-rn-daily-js 是什么?

Config plugin to setup react-native-daily-js on prebuild

如何安装 @daily-co/config-plugin-rn-daily-js?

在项目目录运行 npm install @daily-co/config-plugin-rn-daily-js,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:expo(>=55.0.0 <58.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@daily-co/config-plugin-rn-daily-js 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@daily-co/config-plugin-rn-daily-js 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@daily-co/config-plugin-rn-daily-js 可以商用吗?

@daily-co/config-plugin-rn-daily-js 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@daily-co/config-plugin-rn-daily-js 的下载量有多少?

根据 npm 官方下载统计,@daily-co/config-plugin-rn-daily-js 在 2026/10/11 – 2026/11/09 这 30 天内被下载 77,447 次,日均约 2,582 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@daily-co/config-plugin-rn-daily-js 还在维护吗?

最新版本 0.0.13 发布于 2026/10/16(26 天前);至今共发布 13 个版本,其中过去 12 个月发布了 2 个;首次发布于 2023/02/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。