Files
config-plugins/packages/react-native-branch
Evan Bacon d6050beb2a chore: git ignore build folders (#59)
* chore: git ignore all package build folders in git

* chore: clear all package build folders
2022-03-22 13:27:18 -05:00
..
2022-03-16 00:20:34 +00:00
2022-03-16 00:20:34 +00:00

config-plugins/react-native-branch

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

Expo installation

Tested against Expo SDK 44

This package cannot be used in the "Expo Go" app because it requires custom native code. First install the package with yarn, npm, or expo install.

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:

{
  "expo": {
    "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.

Example

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