yarn @braze/react-native-sdk 18.0.0

6 hours ago
Breaking
  • Fixes the Typescript type for the callback of subscribeToInAppMessage and addListener for Braze.Events.IN_APP_MESSAGE_RECEIVED.
    • These listeners now properly return a callback with the new InAppMessageEvent type. Previously, the methods were annotated to return a BrazeInAppMessage type, but it was actually returning a String.
    • If you are using either subscription API, ensure that the behavior of your in-app messages are unchanged after updating to this version. See our sample code in BrazeProject.tsx.
  • The APIs logInAppMessageClicked, logInAppMessageImpression, and logInAppMessageButtonClicked now accept only a BrazeInAppMessage object to match its existing public interface.
    • Previously, it would accept both a BrazeInAppMessage object as well as a String.
  • BrazeInAppMessage.toString() now returns a human-readable string instead of the JSON string representation.
    • To get the JSON string representation of an in-app message, use BrazeInAppMessage.inAppMessageJsonString.
  • On iOS, [[BrazeReactUtils sharedInstance] formatPushPayload:withLaunchOptions:] has been moved to [BrazeReactDataTranslator formatPushPayload:withLaunchOptions:].
    • This new method is a now a class method instead of an instance method.
  • Adds nullability annotations to BrazeReactUtils methods.
  • Removes the following deprecated methods and properties from the API:
    • getInstallTrackingId(callback:) in favor of getDeviceId.
    • registerAndroidPushToken(token:) in favor of registerPushToken.
    • setGoogleAdvertisingId(googleAdvertisingId:adTrackingEnabled:) in favor of setAdTrackingEnabled.
    • PushNotificationEvent.push_event_type in favor of payload_type.
    • PushNotificationEvent.deeplink in favor of url.
    • PushNotificationEvent.content_text in favor of body.
    • PushNotificationEvent.raw_android_push_data in favor of android.
    • PushNotificationEvent.kvp_data in favor of braze_properties.
  • Updates the native Android SDK version bindings from Braze Android SDK 39.0.0 to 40.0.2.
Added

Don't miss a new react-native-sdk release

NewReleases is sending notifications on new releases.