- 18 Dec 2024
- 1 Minute to read
- DarkLight
- PDF
Integrate the Secure Storage SDK
- Updated on 18 Dec 2024
- 1 Minute to read
- DarkLight
- PDF
Android
The following procedure allows you to integrate and use the Secure Storage SDK in your Android project.
To use the Secure Storage SDK in your Android project
Copy SecureStorageSDK.aar from the OneSpan Mobile Security Suite package to the aars folder.
Link UtilitiesSDK.aar from the OneSpan Mobile Security Suite package to your project.
Add the Kotlin dependency to your gradle build script:
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20"
}
You are now ready to use the Secure Storage SDK. For more information on, see Available methods in the Secure Storage SDK.
iOS
The following procedure allows you to integrate and use the Secure Storage SDK in your iOS project.
To use the Secure Storage SDK in your iOS project
Link MSSSecureStorage.xcframework from the OneSpan Mobile Security Suite package to the linked framework and libraries of your Xcode project.
Link the UtilitiesSDK.xcframework from the OneSpan Mobile Security Suite package to the linked framework and libraries of your Xcode project.
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.
For pure Objective-C projects you need to add a Swift file and create the Bringing Header file to use this Framework.
To see the Objective-C error codes mapped to Swift error cases, refer to the SecureStorageErrorCodes enum in the SDK's public header MSSSecureStorage-Swift.h.
Deprecation of the iteration counter-based data protection
The iteration counter is only required to migrate a secure storage.
To migrate your application to use the new methods to create or write a new secure storage
The first call must be done with the up-to-date initialization method without any iteration counter.
When the migrationNeeded error is thrown,
call the deprecated initialization method with iteration counter
call the write method. This will create files with new security options.
If the legacy storage cannot be opened anymore, you need to remove it by calling the delete method.
You are now ready to use the Secure Storage SDK. For more information on, see Available methods in the Secure Storage SDK.