Quickstart guide

Requirements

  • Cordova 12.0 or later.
  • Android: minimum API level 24.
  • iOS: minimum deployment target 15.0.
  • (Recommended) An SSH key configured locally and registered with GitHub.

Installation

To install the DevRev SDK, run the following command:

1cordova plugin add @devrev/sdk-cordova

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. After obtaining the credentials, configure the DevRev SDK in your app.

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

The SDK will be ready for use once you execute the following configuration method:

1DevRev.configure(appID, successCallback, errorCallback)

Sample app

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

1cd sample
2npm install
3cordova platform add android
4cordova platform add ios

Firebase configuration

To enable push notifications in the sample app, you need to set up your Firebase project and replace the provided dummy configuration files for both Android and iOS.

Push notifications

  1. Go to the Firebase Console.
  2. Create a new project or select an existing one.
  3. Add an Android app (if not already added). Ensure the Package Name matches your Cordova app ID.
  4. Go to Project Settings and download the google-services.json file.
  5. Replace the samples/google-services.json file with the downloaded file.

The provided configuration files contain dummy placeholder values and must be replaced with your actual Firebase project configuration files to ensure proper push notifications functionality.

1cordova run android

OR open platforms/android in Android Studio and run the app.