Step 2. Preparing the project
PingOne React Native
After downloading the React Native SDK repository, install its workspace dependencies and prepare the native projects in PingSampleApp.
Installing JavaScript dependencies
From the React Native SDK repository root, install the workspace dependencies:
yarn install
Build the local React Native SDK packages used by the sample app:
yarn packages:build
Install the sample app dependencies and native iOS dependencies:
yarn sample:clean-install
Preparing the native Android project
The Android build requires a debug signing keystore. Generate one from the React Native SDK repository root:
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.
Add the matching keystore credentials to your global Gradle properties file, for example at ~/.gradle/gradle.properties:
KEYSTORE_PASSWORD=5tr0ngP@S5w0rd!
KEY_PASSWORD=5tr0ngP@S5w0rd!
If ANDROID_HOME is not set, create PingSampleApp/android/local.properties with the path to your Android SDK:
sdk.dir=/path/to/your/Android/SDK
Preparing the native iOS project
The yarn sample:clean-install command you ran earlier installs the Ruby gems and CocoaPods dependencies required by the iOS project.
If you need to reinstall the pods after changing native dependencies, run the following from the PingSampleApp directory:
bundle exec pod install --project-directory=ios