Files
react-native-firebase/docs/iid/quick-start.md
2019-06-23 21:31:11 +01:00

918 B

title, description
title description
Quick Start Using Instance ID in your React Native application.

Instance ID Quick Start

Installation

Install this module with Yarn:

yarn add @react-native-firebase/iid

Integrating manually and not via React Native auto-linking? Check the setup instructions for Android. iOS requires no additional steps.

Module usage

Import the Instance ID package into your project:

import iid from '@react-native-firebase/iid';

The package also provides access to the firebase instance:

import { firebase } from '@react-native-firebase/perf';

Retrieving the instance token

To retrieve the current instance ID, call the get method:

import iid from '@react-native-firebase/iid';

async function getInstanceId() {
  const id = await iid.get();
  console.log('Current Instance ID: ', id);
}