Docs

API Reference

Complete React Native SDK properties and methods reference

Properties

onDeeplinkReceived

readonly onDeeplinkReceived: EventEmitter<DeeplinkResponse>

Event emitter that fires when the app is opened from a Grovs link.


Methods

setSDK

setSDK(enabled: boolean): void

Enable or disable the SDK.

setDebug

setDebug(level: LogLevel): void

Set the debug logging level. Options: info, error.

setPushToken

setPushToken(pushToken?: string): void

Set the push notification token for receiving dashboard messages.

setIdentifier

setIdentifier(identifier?: string): void

Set the user identifier. This value appears in the Grovs dashboard and reports.

setAttributes

setAttributes(attributes?: { [key: string]: any }): void

Set user attributes for identification and behavior analysis in the dashboard.

generateLink(
    title?: string,
    subtitle?: string,
    imageURL?: string,
    data?: { [key: string]: any },
    tags?: string[],
    customRedirects?: CustomRedirects,
    showPreviewIos?: boolean,
    showPreviewAndroid?: boolean,
    tracking?: Tracking
): Promise<string>

Generate a smart link with the specified parameters.

displayMessages

displayMessages(): Promise<void>

Display the messages list as a modal.

numberOfUnreadMessages

numberOfUnreadMessages(): Promise<number>

Get the count of unread messages.