restartSDK()
Destroys the current SDK session and immediately re-initializes it.
Description
Resets the SDK to its initial state by calling destroySDK() followed by initSDK(). The panel
is made visible again after re-initialization completes. Use this function to fully restart the SDK
without removing and recreating the MaestroPanel node.
Usage
m.lib.callFunc("restartSDK")
When to Use
Use this function when:
- You need to fully reset the SDK state between sessions
- Recovering from an error state that requires a full re-initialization
- Testing session lifecycle behavior during development
Example
sub onResetRequested()
m.lib.callFunc("restartSDK")
end sub
Notes
restartSDK()callsdestroySDK()internally, which sends session-end analytics events before tearing down the SDK.- Observe
isReadyto know when re-initialization has completed and the SDK is ready to receive a newconfig.