Orchestration SDKs

Step 2. Preparing the projects

PingOne Advanced Identity Cloud PingAM React Native

After downloading the Orchestration SDK for React Native repository, you can prepare the React Native JavaScript project and install the dependencies, and prepare the Android and iOS projects in the sample app.

Run all the commands on this page from the repository root folder, /ping-react-native-sdk.

Preparing the React Native project

To prepare the React Native project you must install the required packages and dependencies, and also build the Orchestration SDK for React Native modules, which the sample app will use.

  1. To install all workspace dependencies across the monorepo, run the following yarn command:

    yarn install
  2. Build the Orchestration SDK for React Native packages so that the sample application can import them to implement their functionality:

    yarn packages:build

    In your own apps you would install Orchestration SDK for React Native packages from the npm repository.

Preparing the native Android project

The Android build requires a signing keystore. Generate one by running the keytool utility in the repository root:

  1. Run keytool to generate a JKS file:

    keytool -genkeypair -v \
      -keystore PingSampleApp/android/app/pingsampleapp-debug.jks \
      -alias androiddebugkey \
      -keyalg RSA -keysize 2048 -validity 10000 \
      -storepass 5tr0ngP@S5w0rd! -keypass 5tr0ngP@S5w0rd! \
      -dname "CN=Android Debug,O=Android,C=US"

    Replace 5tr0ngP@S5w0rd! with a password of your choice, using the same value for both the -storepass and -keypass parameters.

    You must place the generated keystore file at PingSampleApp/android/app/pingsampleapp-debug.jks.

    The build will fail if the keystore file is missing, or if the passwords in your gradle.properties file do not match those used when generating the keystore.

  2. Add the keystore credentials to your global Gradle properties file, for example at ~/.gradle/gradle.properties.

    KEYSTORE_PASSWORD=5tr0ngP@S5w0rd!
    KEY_PASSWORD=5tr0ngP@S5w0rd!

    By placing the credentials in your global Gradle properties file you reduce the risk of adding the credentials to your source control.

Preparing the native iOS project

After installing JavaScript dependencies, install the iOS native dependencies:

yarn sample:clean-install

The clean-install script installs Bundler gems, runs CocoaPods, and cleans any stale build artifacts.

Run yarn sample:clean-install again from the root of the project after any native dependency changes, or if you encounter unexplained iOS build errors.