The initialize
method is the first and most critical step in setting up the REL-ID SDK. It establishes a secure session and begins the onboarding or authentication workflow. This method is asynchronous and its progress is tracked via events.
Bootstraps the REL-ID SDK.
Creates a REL-ID session in the PRIMARY state.
Prepares the SDK for secure communication and identity workflows (e.g., onboarding, login).
Asynchronous : It does not return a direct response. Progress is reported via SDK events.
Event-driven : You must register event listeners before or at the time of calling initialize()
to capture lifecycle events.
Platform-specific setup : Parameters and listener methods vary slightly across platforms.
Event Description onInitializeProgress
Tracks progress (e.g., threat checks, server connection). Includes statuses like STARTED
, COMPLETED
, INIT_FAILED
. onInitializeError
Reports errors during initialization (e.g., invalid parameters, network issues). onUserConsentThreats
Triggered if non-terminating threats are detected. App decides whether to proceed using takeActionOnThreats()
. onTerminateWithThreats
Triggered for critical threats (configured to terminate). These are blocking issues. onInitialized
Indicates that initialization completed successfully. Returns session metadata and IDV configuration (if available). getUser
Triggered post-initialization when the SDK is ready to accept a user ID. Your app should call setUser()
here.
REL-ID SDK must be initialized before using any of its features. Below are platform-specific initialization methods and parameter explanations.
⚛️ React Native JavaScript
RdClient.initialize(
currentAgentInfo,
currentGatewayHost,
currentGatewayPort,
cipherSpecs,
cipherSalt,
jsonProxySettings,
sslDetails,
RDNALoggingLevel.RDNA_NO_LOGS,
(syncResponse) => {
console.log(syncResponse);
}
);
Parameter Type Description currentAgentInfo
String Software identity info for API-runtime authentication. currentGatewayHost
String Hostname or IP of the gateway server. currentGatewayPort
Number Port number of the gateway server. cipherSpecs
String Format: "AES/256/CFB/NoPadding:SHA-256"
cipherSalt
String Recommended: <APPLICATION_PACKAGE_NAME>
jsonProxySettings
String (JSON) Optional proxy settings JSON. sslDetails
Object Optional SSL details: base64 cert, password, enableSSL. RDNALoggingLevel
Enum Enum for SDK log level.
Always ensure you initialize the SDK before making any other SDK calls.
Verify all cryptographic parameters (cipherSpec
, cipherSalt
) follow the expected format.
For production, use RDNA_NO_LOGS
to disable verbose logging.
If using proxy or SSL certificates, validate configurations and storage security.
💙 Flutter Dart
rdnaClient.initialize(
AGENT_INFO,
HOST,
PORT,
CIPHERSPECS,
CIPHER_SALT,
PROXY_SETTINGS,
RDNASSLCertificate,
RDNALoggingLevel.RDNA_NO_LOGS
);
Parameter Type Description AGENT_INFO
String Software identity string. HOST
String Gateway server IP or hostname. PORT
int Gateway port. CIPHERSPECS
String Cipher config string. CIPHER_SALT
String Recommended: <APPLICATION_PACKAGE_NAME>
PROXY_SETTINGS
JSON String Optional proxy info. RDNASSLCertificate
JSON Object Optional: base64 cert, password, enableSSL. RDNALoggingLevel
Enum Controls logging level.
Always ensure you initialize the SDK before making any other SDK calls.
Verify all cryptographic parameters (cipherSpec
, cipherSalt
) follow the expected format.
For production, use RDNA_NO_LOGS
to disable verbose logging.
If using proxy or SSL certificates, validate configurations and storage security.
⚙️ Cordova JavaScript
com.uniken.rdnaplugin.RdnaClient.initialize(
initSuccess,
initFailure,
[
AGENT_INFO,
HOST,
PORT,
CIPHERSPECS,
CIPHER_SALT,
PROXY_SETTINGS,
RDNASSLCertificate,
com.uniken.rdnaplugin.RdnaClient.RDNALoggingLevel.RDNA_NO_LOGS
]
);
Parameter Type Description initSuccess
Function Success callback. initFailure
Function Failure callback. AGENT_INFO
String Agent info for session setup. HOST
String Gateway IP/hostname. PORT
Number Gateway port. CIPHERSPECS
String Format: "AES/256/CFB/NoPadding:SHA-256"
CIPHER_SALT
String Salt string. PROXY_SETTINGS
JSON Optional proxy config. RDNASSLCertificate
Object Optional SSL cert object. RDNALoggingLevel
Enum SDK logging level.
Always ensure you initialize the SDK before making any other SDK calls.
Verify all cryptographic parameters (cipherSpec
, cipherSalt
) follow the expected format.
For production, use RDNA_NO_LOGS
to disable verbose logging.
If using proxy or SSL certificates, validate configurations and storage security.
🍎 Native iOS (Objective-C) Objective-C
-(RDNAError *)initialize:(NSString *)agentInfo
Callbacks:(id<SomeCallbackProtocol>)callbacks
GatewayHost:(NSString *)authGatewayHNIP
GatewayPort:(uint16_t)authGatewayPORT
CipherSpec:(NSString *)cipherSpec
CipherSalt:(NSString *)cipherSalt
ProxySettings:(RDNAProxySettings *_Nullable)proxySettings
RDNASSLCertificate:(RDNASSLCertificate *_Nullable)rdnaSSLCertificate
DNSServerList:(NSArray<NSString*> *_Nullable)dnsServerList
RDNALoggingLevel:(RDNALoggingLevel)loggingLevel
AppContext:(id)appCtx;
Parameter Type Description agentInfo
String Identity for backend session. callbacks
Object Callback implementation. authGatewayHNIP
String Gateway server hostname/IP. authGatewayPORT
int Gateway port. cipherSpec
String Encryption format string. cipherSalt
String Salt string. proxySettings
Object Optional proxy info. rdnaSSLCertificate
Object Optional cert info. dnsServerList
Array Optional DNS server list. loggingLevel
Enum SDK log level. appCtx
Object Application context.
Always ensure you initialize the SDK before making any other SDK calls.
Verify all cryptographic parameters (cipherSpec
, cipherSalt
) follow the expected format.
For production, use RDNA_NO_LOGS
to disable verbose logging.
If using proxy or SSL certificates, validate configurations and storage security.
🤖 Native Android Java
RDNA.RDNAError Initialize(
String agentInfo,
RDNACallbacks rdnaCallbacks,
String authGatewayHNIP,
int authGatewayPORT,
String cipherSpecs,
String cipherSalt,
RDNAProxySettings proxySettings,
RDNASSLCertificate sslCertificate,
String[] dnsServer,
RDNALoggingLevel loggingLevel,
Object appCtx
);
Parameter Type Description agentInfo
String Backend session agent info. rdnaCallbacks
Object Callback implementation. authGatewayHNIP
String Gateway IP/host. authGatewayPORT
int Gateway port. cipherSpecs
String Encryption string. cipherSalt
String Salt string. proxySettings
Object Optional proxy config. sslCertificate
Object Optional SSL info. dnsServer
Array Optional DNS array. loggingLevel
Enum SDK logging level. appCtx
Object Android app context.
Always ensure you initialize the SDK before making any other SDK calls.
Verify all cryptographic parameters (cipherSpec
, cipherSalt
) follow the expected format.
For production, use RDNA_NO_LOGS
to disable verbose logging.
If using proxy or SSL certificates, validate configurations and storage security.
This section documents specific error codes that may occur during the Initialize
API call and the recommended developer action.
Enum : RDNA_ERR_RDNA_ALREADY_INITIALIZED
Event/API : Initialize(Sync)
Action : Terminate the SDK to avoid re-initialization. This helps during development and prevents errors during React Native code refresh.
Enum : RDNA_ERR_INITIALIZE_ALREADY_IN_PROGRESS
Event/API : Initialize(Sync)
Action : Avoid invoking the Initialize API again while initialization is already in progress. Wait for the current initialization to complete.
Enum : RDNA_ERR_DEVICE_SECURITY_CHECKS_FAILED_FRIDA_MODULES_DETECTED
Event/API : Initialize(Sync)
Action : The SDK detected a Frida attack. This is triggered when:
Connection profile has MTD enabled, and
“Device Threat” category has “App Tampering” detection set to Terminate or Report .