Changelog

SDK Installation

Follow the guide to set-up React-Native SDK integration

Steps To Add Dapi To Your Project

1. Get Your API Key AppKey

2. Set up Backend Server

  • Important! Using the SDK requires configuring a backend server. Read more about the flow and requirements: Server set-up for SDKs. For development purposes, the server can be easily set up on your local machine.

  • Once the server runs successfully, make sure to add the host URL as App Server URL on the Dapi Dashboard

Now the SDK will automatically know where to send its requests!

1740

3. Add Project Bundle ID to Dashboard

For Android:

  1. Open your build.gradle file
  2. Copy the value of applicationId
1474
  1. Open your app in the Dashboard.
  2. Select your Application → Go to App Settings
  3. Click on the Bundle IDs + icon, paste the Bundle ID value, and click Submit
1852

For iOS:

  1. Open your .xcodeproj file
  2. Copy the value of Bundle Identifier
2108
  1. Add it to the dashboard too If it is different from your Android applicationId

Install Dapi React-Native SDK

To integrate Dapi into your React-Native project, install connect-react-native using the following command.

yarn install connect-react-native

Usage

  1. Import Dapi
import Dapi from 'connect-react-native';
  1. Start the SDK
await Dapi.instance.start(
  '#app_key#',
  '#client_user_id#',
  configurations
)
  • Replace app_key with your appKey from the first step.

  • ClientUserID is used to distinguish between different end-users. The value for clientUserID needs to be set by you. We recommend setting clientUserID to your actual user ID that you use to distinguish between users.

Set Client User ID

To Change client user ID

Dapi.instance.setClientUserID("client_user_id");

📘

Note

Check SDK Configurations page for information on configurations

Example

Clone this repository, run the application and see Dapi in action.


What’s Next