Frequently Asked Questions
Here are some frequently asked questions about the Plugin SDK.
What is the difference between DytePlugin.init()
and DytePlugin.ready()
?
DytePlugin.init()
and DytePlugin.ready()
?plugin.init()
is called to initialise the plugin and plugin.ready()
is called when the plugin is ready to emit and receive events from the client app. Usually these events occur one after the other and the user need not manually call plugin.ready()
.
plugin.ready()
can be manually used to control when this communication starts.
import DytePlugin from "@dytesdk/plugin-sdk";
...
const plugin = await DytePlugin.init({ready: false});
// .. do something
plugin.ready();