Releases: braze-inc/braze-react-native-sdk
Releases Β· braze-inc/braze-react-native-sdk
7.0.0
Breaking
- Updates the native Android bridge from Braze Android SDK 26.3.2 to 27.0.1.
Fixed
- Fixes the Android layer to record date custom user attributes as ISO strings instead of integers.
- Fixes a bug introduced in
6.0.0
whereBraze.getInitialUrl()
may not trigger the callback on Android.
Added
- Updates the native iOS bridge from Braze Swift SDK 6.4.0 to 6.6.0.
- Adds support for nested custom user attributes.
- The
setCustomUserAttribute
now accepts objects and arrays of objects. - Adds an optional
merge
parameter to thesetCustomUserAttribute
method. This is a non-breaking change. - Reference our public docs for more information.
- The
- Adds
Braze.setLastKnownLocation()
to set the last known location for the user. - Adds
Braze.registerPushToken()
in the JavaScript layer to post a push token to Braze's servers.- Deprecates
Braze.registerAndroidPushToken()
in favor ofBraze.registerPushToken()
.
- Deprecates
- Adds
Braze.getCachedContentCards()
to get the most recent content cards from the cache, without a refresh. - Adds support for the Feature Flag method
logFeatureFlagImpression(id)
.
6.0.2
Fixed
- Updates the native Android bridge from Braze Android SDK 26.3.1 to 26.3.2.
6.0.1
6.0.0
Breaking
- If you are using the New Architecture, this version requires React Native
0.70
or higher. - Fixes the sample setup steps for iOS apps conforming to
RCTAppDelegate
.β οΈ If your app conforms toRCTAppDelegate
and was following our previousAppDelegate
setup in the sample project or Braze documentation, you will need to reference our updated samples to prevent any crashes from occurring when subscribing to events in the new Turbo Module.β οΈ
- If your project contains unit tests that depend on the Braze React Native module, you will need to update your imports to the
NativeBrazeReactModule
file to properly mock the Turbo Module functions in Jest.- For an example, refer to the sample test setup here.
- Updates the native Android bridge from Braze Android SDK 25.0.0 to 26.3.1.
- Fixes the presentation of in-app messages to match the documented behavior.
- Calling
subscribeToInAppMessages
oraddListener
in the Javascript layer will no longer cause a customBrazeInAppMessageUIDelegate
implementation on iOS to be ignored. - Calling
Braze.addListener
for theinAppMessageReceived
event will subscribe in both the Javascript and the native layers (iOS + Android). This means it is no longer required to callBraze.subscribeToInAppMessage
.- Per the Braze documentation, you do not need to explicitly call
subscribeToInAppMessage
to use the default In-App Message UI.
- Per the Braze documentation, you do not need to explicitly call
- See our documentation for more details around Advanced customization.
- Calling
Added
- Migrates the Braze bridge to a backwards-compatible New Architecture Turbo Module.
- This is a non-breaking change to your existing imports of the Braze SDK if you are using React Native
0.70
+. - The Braze SDK continues to be compatible with both the New Architecture and old React Native architecture.
- This is a non-breaking change to your existing imports of the Braze SDK if you are using React Native
- Adds the
getDeviceId
method to replacegetInstallTrackingId
, which is now deprecated. - Updates the native iOS bridge from Braze Swift SDK 6.3.1 to 6.4.0.
- Adds a conditional library namespace to the Android
build.gradle
file to prepare for React Native 0.73, which uses AGP 8.x.- For more details, refer to this React Native announcement.
5.2.0
Fixed
- Fixes an issue on Android where push notifications wouldn't be forwarded after the app was closed.
- Fixes an issue on iOS preventing in-app message subscription events from being sent if
subscribeToInAppMessage
is called prior to anyBraze.addListener
calls. - Changed the Java compatibility version for the Android plugin to Java 11.
Added
- Updates the native iOS bridge from Braze Swift SDK 6.2.0 to 6.3.1.
5.1.0
Fixed
- Fixes an issue that occured whenever a custom event is logged with dictionary properties using a key named "type".
- Removes the automatic assignment of
BrazeDelegate
in the iOS bridge, allowing for custom implementations to be assigned to thebraze
instance.
5.0.0
Breaking
- Updates the native iOS bridge from Braze Swift SDK 5.13.0 to 6.2.0.
- Removes
setSDKFlavor
andsetMetadata
, which were no-ops starting from version2.0.0
.- On iOS, these fields must be set using the
Braze.Configuration
object at SDK initialization. - On Android, these fields must be set via the
braze.xml
file.
- On iOS, these fields must be set using the
Fixed
- Fixes an issue on Android with
getNewsFeedCards()
andgetContentCards()
where promises could be invoked more than once.
Added
- Updates the native Android bridge from Braze Android SDK 24.3.0 to 25.0.0.
4.1.0
Fixed
- Fixes an issue in the
PushNotificationEvent
object introduced in2.0.1
where a field was namedcontext_text
instead of the correct value ofcontent_text
.
Added
- Adds support for the upcoming Braze Feature Flags product with the following methods:
getFeatureFlag(id)
getAllFeatureFlags()
refreshFeatureFlags()
getFeatureFlagBooleanProperty(id, key)
getFeatureFlagStringProperty(id, key)
getFeatureFlagNumberProperty(id, key)
- Adds the Braze Event key
Braze.Events.FEATURE_FLAGS_UPDATED
for subscribing to Feature Flags updates.
4.0.0
Breaking
- The iOS bridge now automatically attaches the default In-App Message UI with the
braze
instance, without needing to callsubscribeToInAppMessage()
. This updates the behavior from2.0.0
to simplify integration.- This change doesn't affect integrations using custom UIs for in-app messages.
- Changes the returned value when subscribing to
Braze.Events.CONTENT_CARDS_UPDATED
to be aBraze.ContentCardsUpdatedEvent
object instead of a boolean.Braze.ContentCardsUpdatedEvent
contains acards
property which is an array of the Content Cards in the update.- Thanks @Minishlink for your contribution!
Fixed
- Fixes an issue in the iOS bridge where
getContentCards()
andgetNewsFeedCards()
returned data in a different format than the Android bridge. - Fixes the behavior when using the recommended iOS integration where the React Bridge delegate had conflicts with other dependencies. The updated sample app code can be found here.
Added
- Updates the native iOS bridge to Braze Swift SDK 5.13.0.
- Improves typescript definitions for
addListener
event types.
3.0.0
Starting with this release, this SDK will use Semantic Versioning.
β Breaking
- Fixes the behavior in the iOS bridge introduced in version
2.0.0
when logging clicks for in-app messages, content cards, and news feed cards. CallinglogClick
now only sends a click event for metrics, instead of both sending a click event as well as redirecting to the associatedurl
field.- For instance, to log a content card click and redirect to a URL, you will need two commands:
Braze.logContentCardClicked(contentCard.id); // Your own custom implementation Linking.openUrl(contentCard.url);
- This brings the iOS behavior to match version
1.x
and bring parity with Android's behavior.
Fixed
- Fixes an issue in the iOS bridge introduced in
2.0.0
wheregetContentCards()
andgetNewsFeedCards()
would return an array of cards with theurl
andimage
fields asnull
.
Changed
- Updates the native iOS bridge to Braze Swift SDK 5.11.2.
- Updates the native Android bridge to Braze Android SDK 24.3.0.
- Updates
getContentCards
on the iOS bridge to initiate a refresh before returning the array of Content Cards. This brings parity with the Android bridge behavior.