Initialization
Last updated
Last updated
After installing the Wepin Compose Multiplatform Widget Library, the next step is to initialize the SDK. SDK initialization involves creating an instance of WepinWidgetSDK
and using the init()
function to proceed.
To use the Wepin Compose Multiplatform Widget Library, you first need to import the SDK. Add the following import statements:
WepinWidgetSDK
InstanceBefore creating an instance of WepinWidgetSDK
, you must register your app's Android/iOS information in the Wepin Workspace.
Using the registered app information, create an instance of WepinWidgetSDK
.
Parameters
attributes <WidgetAttributes> - Widget properties to define during initialization.
defaultLanguage <String> - Set the default language of the widget. The default value is ko
, and currently supported languages are en
and ko
.
defaultCurrency <String> - Set the default currency of the widget. The default value is KRW
, and currently supported currencies are USD
and KRW
.
Returns
<Boolean>
You can check whether the WepinWidgetSDK
instance has been successfully initialized by using the isInitialized
method.
The return value is as follows:
<Boolean>
Returns true
if initialization was successful, and false
if it failed.