Quickstart guide for React Native

Requirements

  • React Native 0.79.0 or later.
  • For Expo apps, Expo 50.0.0 or later.
  • Android: minimum API level 24.
  • iOS: minimum deployment target 15.1.
  • (Recommended) An SSH key configured locally and registered with GitHub.

Installation

To install the DevRev SDK, run the following command:

1npm install @devrev/sdk-react-native

Set up the DevRev SDK

  1. Open the DevRev web app at https://app.devrev.ai and go to the Settings page.
  2. Under PLuG settings copy the value under Your unique App ID.
  3. Configure the DevRev SDK in your app using the obtained credentials.

The DevRev SDK must be configured before you can use any of its features.

The SDK becomes ready for use once the following configuration method is executed.

1DevRev.configure(appID: string)

Sample app (without framework)

A sample app with use cases for the DevRev SDK for React Native has been provided as a part of our public repository. To set up and run the sample app, follow these steps:

  1. Go to the sample directory:
    $cd sample/react-native
  2. Install the dependencies:
    $yarn install
  3. For iOS, run:
    $pod install --project-directory=ios --repo-update
  4. Start the React Native development server:
    $npx react-native start
  5. Run the app on Android using:
    $npx react-native run-android
    or open the android directory in Android Studio and run the app from there.
  6. Run the app on iOS using:
    $npx react-native run-ios
    or open ios/DevRevSDKSampleRN.xcworkspace in Xcode and run the app from there.