From a2bc1b9daa423cd9e069c78a0c06ffb4d2b45953 Mon Sep 17 00:00:00 2001 From: Daniel Hok Date: Wed, 26 Apr 2023 14:07:06 -0400 Subject: [PATCH] Release Flutter SDK version 5.0.0 --- CHANGELOG.md | 6 ++++++ android/build.gradle | 3 +-- example/android/app/build.gradle | 2 +- example/ios/Runner/AppDelegate.swift | 17 +++++++++-------- example/lib/main.dart | 5 +---- ios/braze_plugin.podspec | 8 ++++---- pubspec.yaml | 2 +- 7 files changed, 23 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c0195c..917f7fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 5.0.0 + +##### Breaking +- The native Android bridge uses [Braze Android SDK 25.0.0](https://github.com/braze-inc/braze-android-sdk/blob/master/CHANGELOG.md#2500). +- The native iOS bridge uses [Braze iOS SDK 6.0.0](https://github.com/braze-inc/braze-swift-sdk/blob/main/CHANGELOG.md#600). + ## 4.1.0 ##### Fixed diff --git a/android/build.gradle b/android/build.gradle index 92683c8..8cfca64 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -18,7 +18,6 @@ rootProject.allprojects { repositories { google() mavenCentral() - maven { url "https://appboy.github.io/appboy-android-sdk/sdk" } } } @@ -52,5 +51,5 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation "com.appboy:android-sdk-ui:24.3.0" + implementation "com.braze:android-sdk-ui:25.0.0" } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 3556f09..d38f435 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -80,7 +80,7 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation 'androidx.multidex:multidex:2.0.0' - implementation "com.appboy:android-sdk-ui:24.3.0" + implementation "com.braze:android-sdk-ui:25.0.0" implementation "com.google.firebase:firebase-messaging:+" } apply plugin: 'com.google.gms.google-services' diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift index 3a8e47e..2ee7016 100644 --- a/example/ios/Runner/AppDelegate.swift +++ b/example/ios/Runner/AppDelegate.swift @@ -35,8 +35,7 @@ let brazeEndpoint = "sondheim.appboy.com" GIFViewProvider.shared = .sdWebImage // - InAppMessage UI - let inAppMessageUI = BrazeInAppMessageUI() - inAppMessageUI.delegate = self + let inAppMessageUI = CustomInAppMessagePresenter() braze.inAppMessagePresenter = inAppMessageUI contentCardsSubscription = braze.contentCards.subscribeToUpdates { contentCards in @@ -48,18 +47,20 @@ let brazeEndpoint = "sondheim.appboy.com" return super.application(application, didFinishLaunchingWithOptions: launchOptions) } +} + +// MARK: In-app message UI - // MARK: BrazeInAppMessageUIDelegate +class CustomInAppMessagePresenter: BrazeInAppMessageUI { - func inAppMessage( - _ ui: BrazeInAppMessageUI, - willPresent message: Braze.InAppMessage, - view: InAppMessageView - ) { + override func present(message: Braze.InAppMessage) { print("=> [In-app Message] Received message from Braze:", message) // Pass in-app message data to the Dart layer. BrazePlugin.processInAppMessage(message) + + // If you want the default UI to display the in-app message. + super.present(message: message) } } diff --git a/example/lib/main.dart b/example/lib/main.dart index 373300f..a515bdf 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -453,10 +453,7 @@ class BrazeFunctionsState extends State { print("[$prefix] Logging impression and body click programmatically."); _braze.logContentCardImpression(contentCard); _braze.logContentCardClicked(contentCard); - - // Only for testing, remove from actual branch - // - Executes dismissal and removes from UI too - _braze.logContentCardDismissed(contentCard); + // _braze.logContentCardDismissed(contentCard); } }); } diff --git a/ios/braze_plugin.podspec b/ios/braze_plugin.podspec index c2c3978..4711917 100644 --- a/ios/braze_plugin.podspec +++ b/ios/braze_plugin.podspec @@ -3,7 +3,7 @@ # Pod::Spec.new do |s| s.name = 'braze_plugin' - s.version = '4.1.0' + s.version = '5.0.0' s.summary = 'Braze plugin for Flutter.' s.homepage = 'https://braze.com' s.license = { :file => '../LICENSE' } @@ -14,9 +14,9 @@ Pod::Spec.new do |s| s.static_framework = true s.dependency 'Flutter' - s.dependency 'BrazeKit', '~> 5.12.0' - s.dependency 'BrazeLocation', '~> 5.12.0' - s.dependency 'BrazeUI', '~> 5.12.0' + s.dependency 'BrazeKit', '~> 6.0.0' + s.dependency 'BrazeLocation', '~> 6.0.0' + s.dependency 'BrazeUI', '~> 6.0.0' s.ios.deployment_target = '11.0' end diff --git a/pubspec.yaml b/pubspec.yaml index f9078aa..a3afee5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: braze_plugin description: This is the Braze plugin for Flutter. Effective marketing automation is an essential part of successfully scaling and managing your business. -version: 4.1.0 +version: 5.0.0 homepage: https://www.braze.com/ repository: https://github.com/braze-inc/braze-flutter-sdk