Initialization
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.
Import SDK
To use the Wepin Compose Multiplatform Widget Library, you first need to import the SDK. Add the following import statements:
Creating and Initializing the WepinWidgetSDK
Instance
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 areen
andko
.defaultCurrency <String> - Set the default currency of the widget. The default value is
KRW
, and currently supported currencies areUSD
andKRW
.
Returns
<Boolean>
Checking Initialization Status (isInitialized)
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, andfalse
if it failed.
Last updated