Integrate the Sudo Profiles SDK
Integrate the Sudo Profiles SDK into your application
Prerequisites
Get Started
Integrate the iOS SDK
To use Sudo Profiles SDK in an iOS app you need to install `SudoProfiles` pod via CocoaPods.
Install CocoaPods by running the following command:
Initialize CocoaPods for your app project by running the following command:
Open the created
Podfile
in a text editor and addSudProfiles
pod a dependency to your app target.
Install pod dependencies by running the following command:
Instantiating and initializing a client:
You only need one client instance for a given user per device. Instantiating multiple clients with the same configuration and using them at the same time may cause unexpected runtime errors to occur.
Integrate the Android SDK
To use Sudo Profiles SDK in an Android app you need to add SudoProfiles
library as a dependency to your project.
Edit the app module Gradle script (build.gradle) and add
SudoProfiles
library as a dependency.
The latest version of the SDK can be found at SDK Releases.
Edit AndroidManifest.xml to add the following app permissions:
Instantiating and initializing a client:
You only need one client instance for a given user per device. Instantiating multiple clients with the same configuration and using them at the same time may cause unexpected runtime errors to occur.
Integrate the JS SDK
To use the Sudo Profiles SDK in a JS project you must add @sudoplatform/sudo-profiles
as a dependency to your project
Instantiating and initializing a Sudo Profiles client:
You only need one client instance for a given user per device. Instantiating multiple clients with the same configuration and using them at the same time may cause unexpected runtime errors to occur.
Symmetric Key Management for JS SDK
Symmetric keys are used in Sudo Profiles JS SDK to encrypt and decrypt Sudo claims. These keys are not stored within our system and need to be loaded into the Sudo Profile Client to be able to encrypt and decrypt your Sudo claims data. These symmetric keys can also be rotated, therefore a potential list of keys will need to be set. The storage and management of these keys will also be the responsibility of the consumer of the Sudo Profiles JS SDK.
Adding Symmetric keys to Sudo Profiles Client:
Symmetric keys are loaded into the Sudo Profiles Client after the client has been instantiated and initialized. Any old keys that have been used in the past to encrypt Sudo claims will also need to be set so that those Sudo claims can be decrypted. The last key loaded will be set as the current key for encrypting and decrypting new Sudo claims.
It is a requirement that the Sudo Profiles Client be loaded with at least one symmetric key.
Last updated