React Native Functionality

An overview of available React Native functionality

The Marigold React Native library wraps the native SDKs and so the exposed methods follow the native methods quite closely. There are some differences however, particularly in how the responses should be handled, which is why we have created this guide as a reference for React Native development.

No Start Engine

A major difference in the React Native SDK is that there is no startEngine method. The engine should be started using the native startEngine methods as soon as possible in the app lifecycle.

Message Stream

A guide to working with the message stream can be found here.

User Data

A guide on how to handle collecting user data can be found here.

Get Device ID

Returns the Device ID for this device:

Marigold.getDeviceId().then(function(id) {
	// Handle Device ID
}, function(e){
	// Handle error
});

iOS Only methods

These methods only have an effect on the iOS platform. They can be safely called on both platforms but they will have no impact on Android:

// Turns on or off iOS SDK crash handlers
Marigold.setCrashHandlersEnabled(true);

// Used to dismiss message detail presented in Marigold.presentMessageDetail()
Marigold.dismissMessageDetail()

Track and Personalise methods

A guide to implementing track and personalize can be found here.