- 04 Mar 2025
- 1 Minute to read
- Print
- DarkLight
- PDF
Integrate the Digipass SDK
- Updated on 04 Mar 2025
- 1 Minute to read
- Print
- DarkLight
- PDF
Android
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 use the Digipass SDK in your Android project
Add the DigipassSDK.aar library from the OneSpan Mobile Security Suite package to your build path.
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:
implementation 'androidx.annotation:annotation:1.3.0' implementation 'com.esotericsoftware:kryo:5.3.0' implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
The functions of the API can now be called inside the application.
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 use the Digipass SDK in your iOS project
Include the OneSpan Digipass SDK XCFramework (MSSDigipass.xcframework) in your Xcode project (linked framework and libraries).
Link UtilitiesSDK.xcframework from the OneSpan Mobile Security Suite package to your Xcode project.
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.