destroy

suspend fun destroy(context: Context, instanceId: String = DEFAULT_INSTANCE_ID)

Destroys an instance of the SDK.

This function deletes all credentials, trusted issuer certificates and device keys from storage for a given instance of the SDK.

The SDK must not be initialised when this method is called, otherwise an error will be thrown.

This API is idempotent, meaning calling it with an instance ID that has never been initialised will not result in an error.

Parameters

instanceId

OPTIONAL: Specifies the instance of the storage to delete. Only the credentials, certificates, and device keys associated with this instance will be removed. If not provided, the default instance will be deleted.

Throws

If the SDK API is called before the SDK initialization process.