Initialization (RN SDK)
- Andrey Veprikov
Owned by Andrey Veprikov
Initialization
Initialize the SDK object and use it anywhere in your application.
Remember to initialize the SDK only once on application launch.
import PersonaClick from '@personaclick/rn-sdk'; ... const pcsdk = new PersonaClick(store_key, stream, debug, send_token);
Initialization parameters
Name | Type | Requirement | Description |
---|---|---|---|
store_key | string | required | The current store key from the PersonaClick account. |
stream | string | required | Data stream code. Alphanumeric string (letters, numbers only). Max length: 16. It can be "ios", "android", or any other string value. It's used to distinguish between mobile apps, websites, and other events sources. |
debug | boolean | optionally | Allows debugging info to be displayed in the console. Default: false. |
send_token | boolean | optionally | Allows managing the automatic getting of Firebase/APNs token and sending it to the system. Default: true. |
Example of use
import PersonaClick from '@personaclick/rn-sdk'; ... const pcsdk = new PersonaClick("c6d2fe5fdca0c8e51d10b07523bc07", "android", false, true);
Initialization Check
The method allows checking if the initialization is done or not.
Method Response
The method returns a boolean value:
- true - initialization completed
- false - initialization failed or ended with an error
Example of use
if (pcsdk.isInit()) { // the initialization was successful } else { // the initialization failed or ended with an error }
Page Navigation
Related Pages
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
Copyright 2018-2024 PersonaClick