2.0.1 - React Native

Breaking changes

  • widgetId is now a required prop on every widget, so a widget without it no longer compiles. Pass a stable label per placement, such as homepage-stories: native 2.0 aggregates widget analytics by it. See Widgets React Native.
  • BlazeFollowEntity.entityType is now required and nullable, so an entity without it no longer compiles. Pass entityType: null where the category is unknown. See Follow entities: React Native.
  • BlazeSDK.setExternalUserId(externalUserId) now takes a required, non-blank string: a blank ID rejects with the reason invalidExternalUserId, where Android used to log the user out. Call BlazeSDK.logout() to log out. See Methods and parameters: React Native.
  • IBlazeAnalytics in onEventTriggered follows the unified events schema of native 2.0: every enumerated value is lowercase snake_case, so a comparison against an old value such as 'Story' no longer compiles, and events and fields are renamed, retyped, or removed. See Global Delegate: React Native and Migrate to the unified events schema.
  • buttons.customActionButtons on BlazeMomentsPlayerStyle and BlazeStoryPlayerStyle takes at most two buttons, each with a unique customParams.id, so a list of three or more no longer compiles. See BlazeMomentsPlayerButtonsStyle: React Native and BlazeStoryPlayerButtonsStyle: React Native.
  • cta.icon.iconPositioning on BlazeMomentsPlayerStyle and BlazeVideosPlayerStyle is now required, so a cta.icon without it no longer compiles. Set it to 'Start'. See BlazeMomentsCtaIcon.
  • BlazeVideosPlayerStyle.waitingRoomMessage is removed, so a style that sets it no longer compiles. The waiting-room overlay of an upcoming live stream shows the native default text on both platforms.

Added

  • IBlazeAnalytics describes the full native 2.0 event, including the tech, tab, and search blocks and the new event actions, triggers, and fields. See Global Delegate: React Native.
  • BlazeSDK.logout() to log out the current user, and restoreExternalUserId in InitOptions to decide whether init restores the previous session's user. See Methods and parameters: React Native.

Changed

  • The external user ID now persists across launches, and init without externalUserId restores the previous user. Pass restoreExternalUserId: false to start every launch anonymous, or call BlazeSDK.logout(). See Methods and parameters: React Native.
  • Analytics volume changes with native 2.0: for example, start and exit events strictly alternate, sdk_init is reported under event_category: 'global', and widget_load and tab_data_load fire once per id per session. Reset baselines that compare across the upgrade. See Reporting changes to expect.
  • On Android, blazeError.domain and blazeError.reason are now the native declared values, such as initialization and applicationNotInitialised, instead of the Kotlin constant names. Update code that compares them. See Methods and parameters: React Native.
  • A playerStyle passed per call or per widget is now applied on top of defaultStoryPlayerStyle, defaultMomentsPlayerStyle, or defaultVideosPlayerStyle in InitOptions, so fields it omits keep the app's default instead of the native preset. See Getting started React Native.
  • Moments and Stories playback configurations now start from the app's current default, as Videos already did, so a field they omit keeps the default and a partial setDefault… call updates the default instead of replacing it. See Methods and parameters: React Native.
  • Android widgets: letterSpacing in widget text styles is now in points, as on iOS. Convert an em value to points (em × textSize). See BlazeTitleStyle.
  • iOS widgets: yPosition: 'BottomToBottom' now places the element at the bottom of the thumbnail, as on Android, and a position anchor equal to the preset's keeps the preset's offset. See BlazeObjectPositioning: React Native.
  • BlazeSDK.init no longer requires cachingSize. When it is omitted, the native cache size applies. See Methods and parameters: React Native.
  • Moments loopBehavior numberOfPlays below 1 now reaches native validation, which uses 1 and reports an invalid configuration through onErrorThrown.

Fixed

  • Widgets: play() on Android now opens the player right away, also while another fullscreen player is open, and on iOS updateDataSource() is ignored on a Moments widget with tabsConfiguration, as on Android. See Methods: React Native.
  • Android: a cta.icon with iconImage on the Moments and Videos players now shows, with its iconTint. See BlazeMomentsCtaIcon.
  • Custom action buttons: a visibilityCondition of and with an empty conditions list now shows the button, and an empty or hides it. See BlazeMomentsPlayerButtonsStyle: React Native and BlazeStoryPlayerButtonsStyle: React Native.
  • Android: a per-call or per-widget pipConfiguration.enterPipOnAppBackground no longer rewrites the default Videos playback configuration. See Methods and parameters: React Native.
  • Android: a widget perItemStyleOverrides entry no longer removes the background image and font that the widget layout set on badge and status-indicator states. See Methods - React Native.
  • Android: an explicit null shouldOrderWidgetByReadStatus now keeps the default true instead of false. See Widgets React Native.
  • Android: widget delegate events fired in quick succession, such as player analytics events or two fast taps, now each reach the delegate. See Widget delegate: React Native.
  • Android: a playbackModificationHandler that returns an empty or missing modifiedURL now plays the original URL, as on iOS.
  • iOS: the podspecs now declare Swift 5, so an app built in Swift 6 language mode builds the SDK pods without a post_install override.