Initialization
Here is how to initialize the Wepin widget iOS SDK.
Then, use the App ID and App Key assigned after app registration to initialize the instance.
Initialize
Before using the created instance, initialize it using the App ID and App Key.
WidgetAttributes
, WidgetType
WidgetAttributes
, WidgetType
The WidgetAttributes
and WidgetType
, which are used as parameters for initialization, are as follows.
appId
: String App ID assigned during registrationappKey
: String App Key assigned during registrationattributes
: Object (optional) Properties of the Wepin Widgettype
: WidgetType It determines how the app widget window will be displayed on initial loading. The default value ishide
.show
: Show the widget window immediately after loading for the first time.hide
: Hide the widget window initially when loading and show it later usingopenWidget()
.defaultLanguage
: String The language to be displayed on the widget. The default value isko
. The currently supported languages areen
andko
.defaultCurrency
: String The currency to be displayed on the widget. The default value isKRW
. The currently supported currencies areUSD
andKRW
.
Handle Universal Link
You need to handle the URL schemes added in the app's Info file in the AppDelegate or SceneDelegate. If your app has SceneDelegate, handle it there. Otherwise, add the following code to handle it int the AppDelegate.
isInitialized
isInitialized
You can use the isInitialized
method to check if the Wepin instance has been initialized successfully.
The returned value is as follows.
boolean init result;
true
if Wepin SDK is already initialized, otherwisefalse
.
Last updated