Releases: braze-inc/braze-cordova-sdk
Releases · braze-inc/braze-cordova-sdk
10.0.0
Breaking
⚠️ This version now requires Cordova Android 13.0.0.⚠️ - Refer to the Cordova release announcement for a full list of project dependency requirements.
- Updated the native Android bridge from Braze Android SDK 30.3.0 to 32.1.0.
- Updated the native iOS bridge from Braze Swift SDK 9.2.0 to 10.1.0.
Fixed
- Fixed the native-to-JavaScript translation of in-app message strings, where nested escape characters were previously being removed.
- Fixed the
subscribeToInAppMessage
method on iOS to respect theuseBrazeUI
setting.- Updated the Android implementation to match iOS by using the
DISCARD
option instead ofDISPLAY_LATER
if the default Braze UI is not used.
- Updated the Android implementation to match iOS by using the
- Fixed the
getContentCardsFromServer
method to trigger an error callback on iOS when cards have failed to refresh.
Added
- Added the
getUserId()
method to get the ID of the current user. This method will returnnull
if the current user is anonymous. - Added support for new Feature Flag property types and APIs for accessing them:
getFeatureFlagTimestampProperty(id, key)
for accessing Int Unix UTC millisecond timestamps asnumber
s.getFeatureFlagImageProperty(id, key)
for accessing image URLs asstring
s.getFeatureFlagJSONProperty(id, key)
for accessing JSON objects asobject
types.
- Added
setLocationCustomAttribute(key, latitude, longitude)
to set a location custom attribute.
9.2.0
Added
- Updated the native iOS bridge from Braze Swift SDK 9.1.0 to 9.2.0.
9.1.0
Added
- Added the following properties to the Content Card model:
isTest
isControl
(Note: If you're implementing your own UI, Control Cards should not be rendered, but you should manually log analytics for them.)
- Updated the native iOS bridge from Braze Swift SDK 9.0.0 to 9.1.0.
9.0.0
Breaking
- Updated the native iOS bridge from Braze Swift SDK 7.7.0 to 9.0.0.
Added
- Added support to modify the allow list for Braze tracking properties via the following JavaScript properties and methods:
TrackingProperty
string enumTrackingPropertyAllowList
object interfaceupdateTrackingPropertyAllowList
method- For details, refer to the Braze iOS Privacy Manifest documentation.
- Added the
setAdTrackingEnabled
method to setadTrackingEnabled
flag on iOS and both theadTrackingEnabled
flag and the Google Advertising ID on Android. - Added
BrazePlugin.subscribeToInAppMessage()
which allows you to listen for new in-app messages from the JavaScript plugin and choose whether or not to use the default Braze UI to display in-app messages. - Added support for logging analytics and functionality for in-app messages.
BrazePlugin.logInAppMessageImpression(message)
BrazePlugin.logInAppMessageClicked(message)
BrazePlugin.loginAppMessageButtonClicked(message, buttonId)
BrazePlugin.hideCurrentInAppMessage()
- Added support for manually performing the action of an in-app message when using a custom UI.
BrazePlugin.performInAppMessageAction(message)
BrazePlugin.performInAppMessageButtonAction(message, buttonId)
- Updated the native Android bridge from Braze Android SDK 30.1.1 to 30.3.0.
8.1.0
Added
- Added new Android feature support that can be added in your
config.xml
:- Ability to set the session timeout behavior to be based either on session start or session end events.
<preference name="com.braze.is_session_start_based_timeout_enabled" value="false" />
- Ability to set the user-facing name as seen via
NotificationChannel.getName
for the Braze defaultNotificationChannel
.<preference name="com.braze.default_notification_channel_name" value="name" />
- Ability to set the user-facing description as seen via
NotificationChannel.getDescription
for the Braze defaultNotificationChannel
.<preference name="com.braze.default_notification_channel_description" value="description" />
- Ability to set whether a Push Story is automatically dismissed when clicked.
<preference name="com.braze.does_push_story_dismiss_on_click" value="true" />
- Ability to set whether the use of a fallback Firebase Cloud Messaging Service is enabled.
<preference name="com.braze.is_fallback_firebase_messaging_service_enabled" value="true" />
- Ability to set the classpath for the fallback Firebase Cloud Messaging Service.
<preference name="com.braze.fallback_firebase_messaging_service_classpath" value="your-classpath" />
- Ability to set whether the Content Cards unread visual indication bar is enabled.
<preference name="com.braze.is_content_cards_unread_visual_indicator_enabled" value="true" />
- Ability to set whether the Braze will automatically register tokens in
com.google.firebase.messaging.FirebaseMessagingService.onNewToken
.<preference name="com.braze.is_firebase_messaging_service_on_new_token_registration_enabled" value="true" />
- Ability to set whether Braze will add an activity to the back stack when automatically following deep links for push.
<preference name="com.braze.is_push_deep_link_back_stack_activity_enabled" value="true" />
- Ability to set the activity that Braze will add to the back stack when automatically following deep links for push.
<preference name="com.braze.push_deep_link_back_stack_activity_class_name" value="your-class-name" />
- Ability to set if Braze should automatically opt-in the user when push is authorized by Android.
<preference name="com.braze.should_opt_in_when_push_authorized" value="true" />
- Ability to set the session timeout behavior to be based either on session start or session end events.
- Added new iOS feature support that can be added in your
config.xml
:- Ability to set the minimum logging level for
Braze.Configuration.Logger
.<preference name="com.braze.ios_log_level" value="2" />
- Ability to set if a randomly generated UUID should be used as the device ID.
<preference name="com.braze.ios_use_uuid_as_device_id" value="YES" />
- Ability to set the interval in seconds between automatic data flushes.
<preference name="com.braze.ios_flush_interval_seconds" value="10" />
- Ability to set whether the request policy for
Braze.Configuration.Api
should be automatic or manual.<preference name="com.braze.ios_use_automatic_request_policy" value="YES" />
- Ability to set if a user’s notification subscription state should automatically be set to optedIn when push permissions are authorized.
<preference name="com.braze.should_opt_in_when_push_authorized" value="YES" />
- Ability to set the minimum logging level for
- Added
BrazePlugin.setLastKnownLocation()
to set the last known location for the user. - Updated the native iOS bridge from Braze Swift SDK 7.6.0 to 7.7.0.
- Updated the native Android bridge from Braze Android SDK 30.0.0 to 30.1.1.
Fixed
- Fixed the
getDeviceId
method to return the value as a success instead of an error on iOS.
8.0.0
Breaking
- Updated the native Android bridge from Braze Android SDK 27.0.1 to 30.0.0.
- Updated the native iOS bridge from Braze Swift SDK 6.6.0 to 7.6.0.
- Renamed the
Banner
Content Card type toImageOnly
:ContentCardTypes.BANNER
→ContentCardTypes.IMAGE_ONLY
- On Android, if the XML files in your project contain the word
banner
for Content Cards, it should be replaced withimage_only
.
BrazePlugin.getFeatureFlag(id)
will now returnnull
if the feature flag does not exist.BrazePlugin.subscribeToFeatureFlagsUpdates(function)
will only trigger when a refresh request completes with success or failure, and upon initial subscription if there was previously cached data from the current session.- Removed the deprecated method
registerAppboyPushMessages
. UsesetRegisteredPushToken
instead.
Added
- Added the ability to set a minimum trigger action time interval for Android and iOS.
- To enable this feature, add the line
<preference name="com.braze.trigger_action_minimum_time_interval_seconds" value="30" />
in yourconfig.xml
.
- To enable this feature, add the line
- Added the ability to configure the app group ID for iOS push extensions.
- To enable this feature, add the line
<preference name="com.braze.ios_push_app_group" value="your-app-group" />
in yourconfig.xml
.
- To enable this feature, add the line
- Added support for automatically forwarding universal links in iOS.
- To enable this feature, add the line
<preference name="com.braze.ios_forward_universal_links" value="YES" />
in yourconfig.xml
.
- To enable this feature, add the line
7.0.0
Breaking
- Updated the native Android version from Braze Android SDK 26.3.2 to 27.0.1.
Added
- Added
logFeatureFlagImpression(id)
. - Updated the native iOS version from Braze Swift SDK 6.5.0 to 6.6.0.
- Added support for nested custom user attributes.
- The
setCustomUserAttribute
method now accepts objects and arrays of objects. - Added an optional
merge
parameter to thesetCustomUserAttribute
method. This is a non-breaking change. - Please see our public docs for more information.
- The
- Exposed the
braze
instance as a convenience static property on iOS viaBrazePlugin.braze
.- This makes it easier to work with tools such as Capacitor by Ionic.
6.0.0
Breaking
- Updated the native iOS version from Braze Swift SDK 5.13.0 to 6.5.0.
- Updated the native Android version from Braze Android SDK 25.0.0 to 26.3.1.
Added
- Added support for Braze SDK Authentication.
- Enabled on Android via
<preference name="com.braze.sdk_authentication_enabled" value="true" />
. - Enabled on iOS via
<preference name="com.braze.sdk_authentication_enabled" value="YES" />
. - Updated
changeUser()
to accept an optional second parameter for an SDK Auth token, e.g.changeUser("user id here", "jwt token here")
. - Added
subscribeToSdkAuthenticationFailures()
which listens for SDK authentication failures. - Added
setSdkAuthenticationSignature()
to set a Braze SDK Authentication signature JWT token.
- Enabled on Android via
5.0.0
Breaking
- Updated these Feature Flag methods to return promises instead of using a callback parameter
getAllFeatureFlags()
getFeatureFlag(id)
getFeatureFlagBooleanProperty(id, key)
getFeatureFlagStringProperty(id, key)
getFeatureFlagNumberProperty(id, key)
- To get a boolean property, for example, you can now use the following syntax:
const booleanProperty = await BrazePlugin.getFeatureFlagBooleanProperty("feature-flag-id", "property-key");
- Changed
subscribeToFeatureFlagUpdates
tosubscribeToFeatureFlagsUpdates
.
4.0.0
Breaking
- Renamed instances of
Appboy
toBraze
.- To ensure that your project is properly migrated to the new naming conventions, note and replace the following instances in your project:
- The plugin has been renamed from
cordova-plugin-appboy
tocordova-plugin-braze
.- Ensure that you run
cordova plugin remove cordova-plugin-appboy
and then re-add the plugin using the instructions in the README.
- Ensure that you run
- This GitHub repository has been moved to the URL
https://github.com/braze-inc/braze-cordova-sdk
. - In your project's
config.xml
file, rename instances ofcom.appboy
tocom.braze
for each of your configuration property keys. - The JavaScript class interface
AppboyPlugin
has been renamed toBrazePlugin
.
- The plugin has been renamed from
- To ensure that your project is properly migrated to the new naming conventions, note and replace the following instances in your project:
- Updated to Braze Android SDK 25.0.0.
- Updated to Braze Swift SDK 5.13.0.
- This update fixes the iOS behavior introduced in version
2.33.0
when logging clicks for content cards. CallinglogContentCardClicked
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:
BrazePlugin.logContentCardClicked(contentCardId); // Your own custom implementation YourApp.openUrl(contentCard["url"]);
- This brings the iOS behavior to match pre-
2.33.0
versions and bring parity with Android's behavior.
- This update fixes the iOS behavior introduced in version
Added
- Added property methods for Feature Flags:
getFeatureFlagBooleanProperty(id, key)
,getFeatureFlagStringProperty(id, key)
,getFeatureFlagNumberProperty(id, key)