HomeDocumentationAPI Reference
Getting StartedAPI ReferenceBug ReportingCrash ReportingAPMHelp Center
Documentation

SDK 12.1.0 Migration Guide forReact Native

Guide for migrating to Luciq's SDK version 12.0 on React Native

With the release of version 12.1.0, a whole host of new products have been released such as, Session Replay, App Ratings, and Rollout Management. Along with this release, a few APIs have been changed to better suit these new features and in order to improve the usage of these APIs.

Initializing the SDK

If you're using Luciq.start to initialize the Luciq SDK, you'll need to migrate to the new Luciq.init method introduced in v11.9.0.

Before

Luciq.start('<APP_TOKEN>', [InvocationEvent.shake]);
Luciq.setSdkDebugLogsLevel(Luciq.sdkDebugLogsLevel.sdkDebugLogsLevelVerbose);

After

Luciq.init({
  token: '<APP_TOKEN>',
  invocationEvents: [InvocationEvent.shake],
  debugLogsLevel: LogLevel.verbose,
});

Removed APIs & Alternatives

Deprecated APICorresponding API
Luciq.startLuciq.init
Luciq.setSdkDebugLogsLevelLuciq.init's debugLogsLevel parameter.
Luciq.setDebugEnabledLuciq.init's debugLogsLevel parameter
Luciq.setReproStepsModeLuciq.setReproStepsConfig
Luciq.enableLuciq.setEnabled(true)
Luciq.disableLuciq.setEnabled(false)
Luciq.isRunningLiveYou can manage and check your app running environment using environment variables.
Luciq.setPrivateViewLuciq.addPrivateView
Luciq.callPrivateApiRemoved.
CrashReporting.reportJSExceptionCrashReporting.reportError
APM.setLogLevelLuciq.init's debugLogsLevel parameter
StringKey.discardAlertActionStringKey.discardAlertStay and StringKey.discardAlertDiscard
StringKey.discardAlertCancelStringKey.discardAlertStay and StringKey.discardAlertDiscard
StringKey.invalidCommentMessageStringKey.insufficientContentMessage
StringKey.invalidCommentTitleStringKey.insufficientContentTitle
StringKey.reproStepsListItemTitleStringKey.reproStepsListItemNumberingTitle

Using Promises instead of Callbacks

The below APIs previously had a callback parameter which is invoked with the result. Since then, we've migrated them to use Promises instead for convenience.

Luciq.getTags
Luciq.getUserAttribute
Luciq.getAllUserAttributes
Replies.hasChats
Replies.getUnreadRepliesCount
Surveys.getAvailableSurveys
Surveys.hasRespondedToSurvey

You can use the returned Promise as follows:

const tags = await Luciq.getTags();

Removed Enums

All the enums that were available as properties under modules similar to Luciq.invocationEvent and BugReporting.option have been deprecated and removed in favor of the new standalone enums introduced in v11.9.0.

Here is the full list of removed enums and their alternatives:

RemovedAlternative
Luciq.invocationEventInvocationEvent
Luciq.reproStepsModeReproStepsMode
Luciq.dismissTypeDismissType
Luciq.sdkDebugLogsLevelLogLevel
Luciq.extendedBugReportModeExtendedBugReportMode
Luciq.localeLocale
Luciq.colorThemeColorTheme
Luciq.floatingButtonEdgeFloatingButtonPosition
Luciq.LCQPositionRecordingButtonPosition
Luciq.welcomeMessageModeWelcomeMessageMode
Luciq.actionTypesActionType
Luciq.stringsStringKey
FeatureRequests.actionTypesActionType
BugReporting.invocationEventInvocationEvent
BugReporting.extendedBugReportModeExtendedBugReportMode
BugReporting.reportTypeReportType
BugReporting.optionInvocationOption
BugReporting.positionRecordingButtonPosition
APM.logLevelLogLevel and the debugLogsLevel in Luciq.init’s config.