Step 2. Install dependencies
To capture contextual data and perform risk evaluations, you must add the PingOne Protect module to your ForgeRock SDK project.
Select your platform below for instructions on installing the required modules or dependencies:
ForgeRock SDK for Android
Add the PingOne Protect dependencies to your Android project.
ForgeRock SDK for iOS
Add the PingOne Protect dependencies to your iOS project by using Cocoapods or Swift Package Manager.
ForgeRock SDK for JavaScript
Add the PingOne Protect dependencies to your JavaScript project by using npm.
Add Android dependencies
To add the PingOne Protect dependencies to your Android project:
-
In the Project tree view of your Android Studio project, open the
Gradle Scripts/build.gradle
file for the module. -
In the
dependencies
section, add the required dependencies:Exampledependencies
section after editing:dependencies { // ForgeRock SDK main module implementation 'org.forgerock:forgerock-auth:4.5.0' // ForgeRock PingOne Protect module implementation 'org.forgerock:ping-protect:4.5.0' }
After installing the module, you can proceed to Step 3. Develop the client app.
Add iOS dependencies
You can use CocoaPods or the Swift Package Manager to add the PingOne Protect dependencies to your iOS project.
Add dependencies using CocoaPods
-
If you do not already have CocoaPods, install the latest version.
-
If you do not already have a Podfile, in a terminal window, run the following command to create a new Podfile:
pod init
-
Add the following lines to your Podfile:
pod 'PingProtect' // Add-on for PingOne Protect
-
Run the following command to install pods:
pod install
Add dependencies using Swift Package Manager
-
With your project open in Xcode, select File > Add Package Dependencies.
-
In the search bar, enter the ForgeRock SDK for iOS repository URL:
https://github.com/ForgeRock/forgerock-ios-sdk
. -
Select the
forgerock-ios-sdk
package, and then click Add Package. -
In the Choose Package Products dialog, ensure that the
PingProtect
library is added to your target project. -
Click Add Package.
-
In your project, import the library:
// Import the PingOne Protect library import PingProtect
After installing the module, you can proceed to Step 3. Develop the client app.
Add JavaScript dependencies
Install the PingOne Protect module by using npm:
npm install @forgerock/ping-protect
After installing the module, you can proceed to Step 3. Develop the client app.