Step 2. Install dependencies
To capture contextual data and perform risk evaluations, you must add the PingOne Protect module to your DaVinci Client project.
Select your platform below for instructions on installing the required modules or dependencies:
DaVinci Client for Android
Add the PingOne Protect dependencies to your Android project.
DaVinci Client for iOS
Add the PingOne Protect dependencies to your iOS project by using Cocoapods or Swift Package Manager.
DaVinci Client 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.ktsfile for the module. -
In the
dependenciessection, add the required dependencies:Exampledependenciessection after editingbuild.gradle.kts:dependencies { // DaVinci Client main module implementation("com.pingidentity.sdks:davinci:1.3.0") // PingOne Protect module implementation("com.pingidentity.sdks:ping-protect:1.3.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 'PingOneProtect' // 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 DaVinci Client for iOS repository URL:
https://github.com/ForgeRock/ping-ios-sdk. -
Select the
ping-ios-sdkpackage, and then click Add Package. -
In the Choose Package Products dialog, ensure that the
PingProtectlibrary 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 DaVinci Client and PingOne Protect modules by using npm:
npm install @forgerock/davinci-client @forgerock/protect
After installing the module, you can proceed to Step 3. Develop the client app.