From 3f4bac0cbfbbb3765ad06f6649d3dd4d836efbf6 Mon Sep 17 00:00:00 2001 From: Jeriel Ng Date: Fri, 10 May 2024 14:32:30 -0400 Subject: [PATCH] Release version 11.0.0 --- BrazeProject/ios/BrazeProject.xcodeproj/project.pbxproj | 4 ++-- BrazeProject/ios/Podfile.lock | 4 ++-- CHANGELOG.md | 8 ++++++++ android/build.gradle | 2 +- .../java/com/braze/reactbridge/BrazeReactBridgeImpl.kt | 4 +++- package.json | 2 +- src/index.d.ts | 2 +- 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/BrazeProject/ios/BrazeProject.xcodeproj/project.pbxproj b/BrazeProject/ios/BrazeProject.xcodeproj/project.pbxproj index a76a35c..9e0f13e 100644 --- a/BrazeProject/ios/BrazeProject.xcodeproj/project.pbxproj +++ b/BrazeProject/ios/BrazeProject.xcodeproj/project.pbxproj @@ -13,7 +13,7 @@ 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 1C1F39C39078CBA3B1D4BA6B /* libPods-BrazeProjectRichPush.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31F097B316BD83D92ECEDB44 /* libPods-BrazeProjectRichPush.a */; }; 566709436C351B31403D41A4 /* libPods-BrazeProject.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A1CCEF5F00EE40BE7DCA27D /* libPods-BrazeProject.a */; }; - 7FFA3C438F6ECE230980EE95 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + 7FFA3C438F6ECE230980EE95 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; D49243504D0CC62449E7A753 /* libPods-BrazeProject-BrazeProjectTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6966516151504FECB8343E39 /* libPods-BrazeProject-BrazeProjectTests.a */; }; EC9B91F32B1F698600C6BD5D /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC9B91F22B1F698600C6BD5D /* NotificationService.swift */; }; @@ -113,7 +113,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7FFA3C438F6ECE230980EE95 /* (null) in Frameworks */, + 7FFA3C438F6ECE230980EE95 /* BuildFile in Frameworks */, D49243504D0CC62449E7A753 /* libPods-BrazeProject-BrazeProjectTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/BrazeProject/ios/Podfile.lock b/BrazeProject/ios/Podfile.lock index 12a70d5..985c982 100644 --- a/BrazeProject/ios/Podfile.lock +++ b/BrazeProject/ios/Podfile.lock @@ -1,6 +1,6 @@ PODS: - boost (1.83.0) - - braze-react-native-sdk (10.0.0): + - braze-react-native-sdk (11.0.0): - BrazeKit (~> 9.0.0) - BrazeLocation (~> 9.0.0) - BrazeUI (~> 9.0.0) @@ -1395,7 +1395,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 - braze-react-native-sdk: 1611a97f286d0902ca7be0f9bf14d7af63365b41 + braze-react-native-sdk: f36e240e025608023805557b6ba5d158399c8702 BrazeKit: 7406e77825c624d8e7a162d858a4bffdf79270f5 BrazeLocation: 43405bf92037c9840f5f5467a7b8418583bc7850 BrazeNotificationService: ac70f36d3af705108ab42a7437118811a0a2173e diff --git a/CHANGELOG.md b/CHANGELOG.md index 4001d32..2d5322b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ ⚠️ In version 2.0.0, we changed the iOS bridge from AppboyKit, which is written in Objective-C, to the new [Swift SDK](https://github.com/braze-inc/braze-swift-sdk). If you are upgrading from a version below 2.0.0 to a version above 2.0.0, please read [the instructions](https://github.com/braze-inc/braze-react-native-sdk/blob/master/CHANGELOG.md#200) to ensure a smooth transition and backward compatibility. +## 11.0.0 + +##### Breaking +- Updates the native Android version bindings [from Braze Android SDK 30.4.0 to 31.1.0](https://github.com/braze-inc/braze-android-sdk/compare/v30.4.0...v31.1.0#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed). + +##### Fixed +- Fixes an issue on Android where the `timestamp` of a `PushNotificationEvent` was incorrectly translated from a `long` to a `int`. The value received by the JavaScript layer is now the same as the value sent from the Android code. + ## 10.0.0 ##### Breaking diff --git a/android/build.gradle b/android/build.gradle index 0cf171e..4066ff1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -49,6 +49,6 @@ android { } dependencies { - api 'com.braze:android-sdk-ui:30.4.0' + api 'com.braze:android-sdk-ui:31.1.0' api 'com.facebook.react:react-native:+' } diff --git a/android/src/main/java/com/braze/reactbridge/BrazeReactBridgeImpl.kt b/android/src/main/java/com/braze/reactbridge/BrazeReactBridgeImpl.kt index c5323f2..46b81a4 100644 --- a/android/src/main/java/com/braze/reactbridge/BrazeReactBridgeImpl.kt +++ b/android/src/main/java/com/braze/reactbridge/BrazeReactBridgeImpl.kt @@ -468,7 +468,9 @@ class BrazeReactBridgeImpl( eventData.notificationBadgeNumber?.let { putInt("badge_count", it) } eventData.notificationExtras.getLong("braze_push_received_timestamp") .takeUnless { it == 0L }?.let { - putInt("timestamp", it.toInt()) + // Convert to Double when passing to JS layer since timestamp can't fit in a 32-bit + // int and WriteableNativeMap doesn't support long's bc of language limitations + putDouble("timestamp", it.toDouble()) } putBoolean( "use_webview", diff --git a/package.json b/package.json index 7b76796..81ce035 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@braze/react-native-sdk", - "version": "10.0.0", + "version": "11.0.0", "description": "Braze SDK for React Native.", "main": "src/index.js", "types": "src/index.d.ts", diff --git a/src/index.d.ts b/src/index.d.ts index e269e22..d6bbb91 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1355,7 +1355,7 @@ interface BrazeEvent { IN_APP_MESSAGE_RECEIVED: 'inAppMessageReceived'; /** Callback that triggers when Feature Flags have received an update in the latest refresh. */ FEATURE_FLAGS_UPDATED: 'featureFlagsUpdated'; - /** Only supported on Android. */ + /** Callback passes a `PushNotificationEvent` object whenever a push event has been detected. */ PUSH_NOTIFICATION_EVENT: 'pushNotificationEvent'; } export const Events: BrazeEvent;