clevertap-react-native
Version:
CleverTap React Native SDK.
26 lines (23 loc) • 6.99 kB
Markdown
in the payload formats along with the platform affected. These changes make the payload consistent across Android and iOS platform from v1.1.0.
Refer [Sample App](https://github.com/CleverTap/clevertap-react-native/blob/master/Example/App.js) for examples on how to access the payload.
| Callback | Platform affected | Old Payload Format | New Payload Format | Remarks |
| --------------------------------------- | ----------------- | -------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CleverTapInAppNotificationButtonTapped | iOS | { "customExtras": {} } | {} | Removed \`customExtras\` key |
| CleverTapInAppNotificationDismissed | iOS | { "actionExtras": {} } | { "extras": {}, "actionExtras": {} } | Started passing an empty Object to \`extras\` key when found null |
| CleverTapInAppNotificationShowed | Android | { "data": '{}' } | { "data": {} } | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
| CleverTapPushNotificationClicked | iOS | { "customExtras": {} } | {} | Removed \`customExtras\` key |
| CleverTapPushPermissionResponseReceived | iOS | { "isPermissionGranted": false } | { "accepted": false } | Renamed \`isPersmissionGranted\` key to \`accepted\` |
| CleverTapInboxDidInitialize | iOS | undefined | {} | Passed an empty Object when found null |
| CleverTapInboxMessagesDidUpdate | iOS | undefined | {} | Passed an empty Object when found null |
| CleverTapInboxMessageTapped | Both | { "data": '{}' } | { "data": {}, "contentPageIndex": 0, "buttonIndex": 1 } | \- Replaced stringified JSON with plain JSON format to access the \`data\` key without JSON parsing<br>\- Added \`contentPageIndex\` and \`buttonIndex\` keys to the payload |
| CleverTapDisplayUnitsLoaded | Android | { "displayUnits": [ '{}' ] } | { "displayUnits": [ {} ] } | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
| CleverTapFeatureFlagsDidUpdate | iOS | undefined | {} | Passed an empty Object when found null |
| CleverTapProductConfigDidInitialize | iOS | undefined | {} | Passed an empty Object when found null |
| CleverTapProductConfigDidFetch | iOS | undefined | {} | Passed an empty Object when found null |
| CleverTapProductConfigDidActivate | iOS | undefined | {} | Passed an empty Object when found null |
| getAllInboxMessages | Android | [ '{}' , '{}' ] | [ {}, {} ] | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
| getUnreadInboxMessages | Android | [ '{}' , '{}' ] | [ {}, {} ] | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
| getInboxMessageForId | Android | "{}" | {} | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
| getAllDisplayUnits | Android | [ '{}' , '{}' ] | [ {}, {} ] | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
| getDisplayUnitForId | Android | "{}" | {} | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
This document demonstrates the changes