@config-plugins/react-native-branch

中文文档
13.0.2发布于 2026/08/15MITTypeScriptCommonJS近 30 天下载 45.4万

Config plugin to auto configure react-native-branch on prebuild

原始使用文档
文档目录3 节
  1. Versioning
  2. Expo installation
  3. API

config-plugins/react-native-branch

Config plugin to auto-configure react-native-branch when the native code is generated (npx expo prebuild).

Versioning

Ensure you use versions that work together!

exporeact-native-branch@config-plugins/react-native-branch
56.0.06.10.013.0.0
55.0.06.9.012.0.0
54.0.06.8.011.0.0
53.0.06.6.010.0.0
52.0.06.4.09.0.0
51.0.06.2.1 38.0.0
50.0.06.0.07.0.0
49.0.05.9.06.0.0
48.0.05.7.05.0.0

Expo installation

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

First install the package with yarn, npm, or npx expo install.

npx expo install react-native-branch @config-plugins/react-native-branch

After installing this npm package, add the config plugin to the plugins array of your app.json or app.config.js:

{
  "plugins": ["@config-plugins/react-native-branch"]
}

Next, rebuild your app as described in the "Adding custom native code" guide.

API

The plugin provides props for extra customization. Every time you change the props or plugins, you'll need to rebuild (and prebuild) the native app. If no extra properties are added, defaults will be used.

  • apiKey (string): Branch API key. Optional.
  • iosAppDomain (string): App Domain for iOS. Optional.
  • iosUniversalLinkDomains (string[]): Universal link domains for iOS. Optional.

Example

{
  "plugins": [
    [
      "@config-plugins/react-native-branch",
      {
        "apiKey": "key_live_f9f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8",
        "iosAppDomain": "awesome-alternate.app.link",
        "iosUniversalLinkDomains": ["awesome.app.link", "awesome-alternate.app.link", "awesome.test.app.link"]
      }
    ]
  ]
}

版本与发布记录

@config-plugins/react-native-branch 共发布 18 个版本,首次发布于 2022/02/02;过去 12 个月发布了 4 个版本。

版本发布日期距今
13.0.2latest2026/08/152 个月前
13.0.12026/06/045 个月前
13.0.02026/06/035 个月前
12.0.02026/04/107 个月前
11.0.02025/09/241.1 年前
10.0.02025/06/031.4 年前

关于 @config-plugins/react-native-branch 的常见问题

@config-plugins/react-native-branch 是什么?

Config plugin to auto configure react-native-branch on prebuild

如何安装 @config-plugins/react-native-branch?

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

@config-plugins/react-native-branch 支持 TypeScript 吗?

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

@config-plugins/react-native-branch 支持 ESM 还是 CommonJS?

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

@config-plugins/react-native-branch 可以商用吗?

@config-plugins/react-native-branch 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@config-plugins/react-native-branch 的下载量有多少?

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

@config-plugins/react-native-branch 还在维护吗?

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