Skip to content

Releases: braze-inc/braze-react-native-sdk

7.0.0

12 Sep 17:18
Compare
Choose a tag to compare
Breaking
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 where Braze.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 the setCustomUserAttribute method. This is a non-breaking change.
    • Reference our public docs for more information.
  • 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 of Braze.registerPushToken().
  • 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

11 Aug 21:29
Compare
Choose a tag to compare
Fixed

6.0.1

08 Aug 15:10
Compare
Choose a tag to compare
Fixed
  • Adds 'DEFINES_MODULE' => 'YES' to the iOS Podspec when compiling the Turbo Module to prevent the need for static framework linkage when using the Braze Expo plugin.

6.0.0

03 Aug 19:06
Compare
Choose a tag to compare
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 to RCTAppDelegate and was following our previous AppDelegate 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 or addListener in the Javascript layer will no longer cause a custom BrazeInAppMessageUIDelegate implementation on iOS to be ignored.
    • Calling Braze.addListener for the inAppMessageReceived event will subscribe in both the Javascript and the native layers (iOS + Android). This means it is no longer required to call Braze.subscribeToInAppMessage.
      • Per the Braze documentation, you do not need to explicitly call subscribeToInAppMessage to use the default In-App Message UI.
    • See our documentation for more details around Advanced customization.
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.
  • Adds the getDeviceId method to replace getInstallTrackingId, 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.

5.2.0

13 Jul 19:33
Compare
Choose a tag to compare
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 any Braze.addListener calls.
  • Changed the Java compatibility version for the Android plugin to Java 11.
Added

5.1.0

21 Jun 15:42
Compare
Choose a tag to compare
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 the braze instance.

5.0.0

23 May 22:25
Compare
Choose a tag to compare
Breaking
  • Updates the native iOS bridge from Braze Swift SDK 5.13.0 to 6.2.0.
  • Removes setSDKFlavor and setMetadata, which were no-ops starting from version 2.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.
Fixed
  • Fixes an issue on Android with getNewsFeedCards() and getContentCards() where promises could be invoked more than once.
Added

4.1.0

10 Apr 17:45
Compare
Choose a tag to compare
Fixed
  • Fixes an issue in the PushNotificationEvent object introduced in 2.0.1 where a field was named context_text instead of the correct value of content_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

31 Mar 19:05
Compare
Choose a tag to compare
Breaking
  • The iOS bridge now automatically attaches the default In-App Message UI with the braze instance, without needing to call subscribeToInAppMessage(). This updates the behavior from 2.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 a Braze.ContentCardsUpdatedEvent object instead of a boolean.
    • Braze.ContentCardsUpdatedEvent contains a cards 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() and getNewsFeedCards() 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

13 Mar 21:03
Compare
Choose a tag to compare

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. Calling logClick now only sends a click event for metrics, instead of both sending a click event as well as redirecting to the associated url 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 where getContentCards() and getNewsFeedCards() would return an array of cards with the url and image fields as null.
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.