SDK Lifecycle

Synerise

Declared In

lib/main/Synerise.js

Declaration

class Synerise

Properties

Property Type Description
Initializer SyneriseInitializer Returns new builder object used for initialization
Settings SettingsModule Returns Settings module when Synerise is initialized
Client ClientModule Returns Client module when Synerise is initialized
Tracker TrackerModule Returns Tracker module when Synerise is initialized
Notifications NotificationsModule Returns Notifications module when Synerise is initialized
Injector InjectorModule Returns Injector module when Synerise is initialized
Promotions PromotionsModule Returns Promotions module when Synerise is initialized
Content ContentModule Returns Content module when Synerise is initialized

Methods

Sets the callback function that is invoked when the Synerise SDK is initialized.

public static onReady(callback: () => void)


Sets the callback function that is invoked when an error occurs while initializing the Synerise SDK.

public static onError(callback: (error: Error) => void)


Checks if Synerise is initialized.

public static isInitialized(): boolean


Changes Client API Key dynamically.

public static changeClientApiKey(clientApiKey: string)




Synerise Initializer

Builder object to initialize the SDK step by step.

Declared In

lib/main/Synerise.js

Declaration

class SyneriseInitializer

Methods

Sets Client API Key for the SDK initialization.

public withClientApiKey(clientApiKey: string)


Sets Synerise API base URL for SDK initialization in a custom environment.

public withBaseUrl(baseUrl: string)


Enables/disables console logs.

public withDebugModeEnabled(debugModeEnabled: boolean)


Enables/disables crash handling.

public withCrashHandlingEnabled(crashHandlingEnabled: boolean)


Sets settings that have to be set before Synerise is initialized.

public withSettings(settings: ISettingsOptions)


Initializes Synerise.

public init()


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.