Initialization
Here is how to initialize the Wepin React Native SDK.
Import SDK
Add the <Wepin.WidgetView>
component to the main component and insert content inside it.
init
init
Initialize the Wepin instance.
Parameters
appId
: String App ID assigned during registrationappKey
: String App Key assigned during registrationattributes
: IAttributes (optional) Properties of the Wepin Widget. It is defined in@wepin/types
.type
: String 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 usingopenWindow()
.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
.loginProviders
: [String] Here is the list of login providers:google
,apple
,naver
, anddiscord
. Define and use only the necessary login providers. If you do not specify this value, all the four providers can be used by default.The
loginProviders
parameter is supported from@wepin/types
versionv0.0.11
or higher.
Example
isInitialized
isInitialized
You can use the isInitialized
method to check if the Wepin stance has been initialized successfully.
Returned value
<boolean>
init result;
true
if Wepin SDK is already initialized, otherwisefalse
.
Last updated