Integrate the Digipass SDK

Prev Next

Android

AAR artifact-based integration

The Digipass SDK provides APIs with both ByteArrays and CharSequence for the passwords. OneSpan recommends using the APIs with ByteArrays because they are more secure. The CharSequence APIs are provided for convenience.

To integrate the Digipass SDK into your Android project via aar file

  1. Add the DigipassSDK.aar library from the OneSpan Mobile Security Suite package to your build path.

  2. Add the UtilitiesSDK.aar library from the OneSpan Mobile Security Suite package to your build path.

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

dependencies {
implementation 'com.esotericsoftware:kryo:5.6.2'
implementation 'org.bouncycastle:bcprov-jdk18on:1.85.2'
}

The functions of the API can now be called inside the application.

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 Digipass 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_digipass_android:+'.

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

iOS

The integration of the Digipass SDK – C Edition into an iPhone application is straightforward, provided the iPhone development environment is all set (with Xcode IDE and iOS SDK version 12.0 or later). The API comes as a static library that needs to be included in an application.

Before using any C function that applies the dynamic vector, the vector length must be retrieved using the DPSDK_GetDynamicVectorLength function. This function returns the amount of memory to allocate for the dynamic vector which prevents potential buffer overflows when upgrading to a version of the Digipass SDK that needs a larger buffer to store the dynamic vector than a previous product version.

To integrate the Digipass SDK into your iOS project

  1. Include the OneSpan Digipass SDK  XCFramework (MSSDigipass.xcframework) in your Xcode project (linked framework and libraries).

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

  3. In the Targets section of the IDE, add the static frameworks to the Link Binary with Libraries group to ensure the application is properly linked.

The functions of the API can now be called inside the application.

Your project must be linked with the -ObjC flag. This should be set in Other Linker Flags in the target's build settings. In a pbxproj project file, the raw key is OTHER_LDFLAGS.

To use this framework with pure Objective-C projects, you need to add a Swift file and create the Bringing Header 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!