open

suspend fun open(config: DittoAndroidConfig): Ditto

Asynchronously creates and returns a new Ditto instance using the provided configuration.

This is the recommended way to initialize Ditto in async environments. The method will suspend until the instance is ready or an error is thrown.

Important: In Ditto version 4.x, this method is only partially async and blocks for a significant portion of the initialization process. It will become fully async starting with Ditto 5.0.

Return

The newly created Ditto instance.

Parameters

config

The configuration to initialize the new Ditto instance with.

See also

for a blocking, non-async alternative.

Throws

May throw other DittoErrors for other initialization failures.