Configuring your License

For v1.0.0 and Newer

Starting with v1.0.0, license configuration is simplified through the Expo config plugin system.

Allowlist your Bundle Identifiers

In order to use the player in your app, you have to allowlist the bundle identifier (iOS) and/or Application ID (Android) of your app(s) into which you are integrating the player. This is a security mechanism that protects your license from being used elsewhere.

Allowlisting can be done in the Dashboard under Player > Licenses.

Set your license key via Expo Config Plugin

The recommended approach is to configure your license key through the Expo config plugin in your app.json or app.config.js:

{
  "expo": {
    "plugins": [
      [
        "bitmovin-player-react-native",
        {
          "playerLicenseKey": "YOUR-LICENSE-KEY-HERE"
        }
      ]
    ]
  }
}

This automatically configures the license key in both iOS and Android native projects when you run npx expo prebuild.

Alternative: Set license key via code

You can still set the license key programmatically if needed:

// With hooks
import { usePlayer } from 'bitmovin-player-react-native';
const player = usePlayer({
  licenseKey: 'YOUR-LICENSE-KEY-HERE',
});

// Without hooks
import { Player } from 'bitmovin-player-react-native';
const player = new Player({
  licenseKey: 'YOUR-LICENSE-KEY-HERE',
});

Migration from Earlier Versions

If you're upgrading from a version prior to v1.0.0, see our Migration Guide for step-by-step instructions on migrating your license configuration.


For Versions Prior to v1.0.0

Allowlist your Bundle Identifiers

In order to use the player in your app, you have to allowlist the bundle identifier (iOS) and/or Application ID (Android) of your app(s) into which you are integrating the player. This is a security mechanism that protects your license from being used elsewhere.

Allowlisting can be done in the Dashboard under Player > Licenses.

Set your license key

Your license key can either be set via code or by configuring your apps' Info.plist and AndroidManifest.xml.

Setting the license key via code

// Simply pass the `licenseKey` property to `PlayerConfig` when instantiating a player.

// With hooks
import { usePlayer } from 'bitmovin-player-react-native';
const player = usePlayer({
  licenseKey: '<ENTER-YOUR-LICENSE-KEY>',
});

// Without hooks
import { Player } from 'bitmovin-player-react-native';
const player = new Player({
  // Make sure to use React.createRef if instantiating inside a component.
  licenseKey: '<ENTER-YOUR-LICENSE-KEY>',
});

Setting the license key through Info.plist (iOS)

Add the following lines to the <dict> section of your ios/Info.plist file:

<key>BitmovinPlayerLicenseKey</key>  
<string>YOUR-LICENSE-KEY-HERE</string>

Setting the license key through AndroidManifest.xml

Add the following line to the <application> section of your android/app/src/main/AndroidManifest.xml:

<meta-data android:name="BITMOVIN_PLAYER_LICENSE_KEY" android:value="ENTER-YOUR-LICENSE-KEY" />