Integrate the Root Detection SDK

Prev Next

Android

The SDK is delivered in two formats, as

  • AAR file

  • Local Maven repository with transitive dependencies.

    This repository also includes a documentation jar file to view the technical documentation in Android Studio (to be used in conjunction with the repository)

AAR artifact-based integration

To integrate the Root Detection SDK into your Android project via aar file

  1. Copy RootDetectionSDK.aar from the OneSpan Mobile Security Suite package to the aars folder.

  2. Link UtilitiesSDK.aar from the OneSpan Mobile Security Suite package to your project.

  3. Copy the signature file from the OneSpan Mobile Security Suite package to the assets/signature folder.

To use the Root Detection SDK library, you also need to add the following external libraries to your maven/gradle project:

dependencies {
                implementation 'androidx.annotation:annotation:1.3.0'
                implementation 'com.esotericsoftware:kryo:5.1.1'
                implementation 'org.bouncycastle:bcprov-jdk18on:1.85.2'
                }

Maven-based integration

The SDK artifact is also delivered as a local Maven repository with transitive dependencies, and the package includes a documentation jar file to view the technical documentation in Android Studio (to be used in conjunction with the Maven repository).

To integrate the SDK via maven repository:

  1. Copy the maven folder from the published artifacts to the root folder of your application.

  2. Define the dependency in your build.gradle file: implementation 'com.onespan:sdk_root_detection_android:+'.

  3. Comment out any existing definitions, for example: implementation(name: 'RootDetectionSDK', ext: 'aar'), implementation(name: 'UtilitiesSDK', ext: 'aar')

iOS

To integrate the Root Detection SDK into your iOS project

  1. Link MSSRootDetection.xcframework from the OneSpan Mobile Security Suite package to your Xcode project (linked framework and libraries).

  2. Link the libc++ library from the iOS SDK to your Xcode project via the Link Binary With Libraries build phase (only required if the project is compiled in Objective-C and not in Objective-C++).

  3. Link the UtilitiesSDK.xcframework library from the OneSpan Mobile Security Suite package to your Xcode project (linked framework and libraries).

  4. Copy the signature file from the OneSpan Mobile Security Suite package to the res folder.

Your project must be compiled with the libc++ standard library.

You are now ready to use the Root Detection SDK.

For more information on the functions of the SDK, see Start the analysis and Obtain the signature file.

API reference documentation and sample applications

To learn more about the public APIs and their functions, exceptions, and error codes, refer to the technical documentation that is included in the product package for each SDK and each platform. In the product package, you can also find the sample applications provided for each platform to see examples of how the SDKs can be used.

These sample apps are intended only to demonstrate basic scenarios and SDK usage. They are not designed to be copied directly into production projects!