From 7afd6e0ac0bf59fcf9918e243298114888581ee2 Mon Sep 17 00:00:00 2001 From: Daniel Hok Date: Wed, 30 Nov 2022 11:32:17 -0500 Subject: [PATCH] Version 5.6.4 --- BrazeKit.podspec | 6 ++-- BrazeLocation.podspec | 8 ++--- BrazeNotificationService.podspec | 6 ++-- BrazePushStory.podspec | 6 ++-- BrazeUI.podspec | 6 ++-- CHANGELOG.md | 24 +++++++++++++- Examples/ObjC/Sources/ContentCards/Info.plist | 26 +++++++++++++++ .../ObjC/Sources/InAppMessages/Info.plist | 26 +++++++++++++++ .../Swift/Sources/ContentCards/Info.plist | 26 +++++++++++++++ .../InAppMessageInfoViewController.swift | 33 ------------------- .../Swift/Sources/InAppMessages/Info.plist | 26 +++++++++++++++ Package.swift | 16 ++++----- README.md | 2 +- .../InAppMessageUI/InAppMessageUI.swift | 7 +++- 14 files changed, 158 insertions(+), 60 deletions(-) create mode 100644 Examples/ObjC/Sources/ContentCards/Info.plist create mode 100644 Examples/ObjC/Sources/InAppMessages/Info.plist create mode 100644 Examples/Swift/Sources/ContentCards/Info.plist create mode 100644 Examples/Swift/Sources/InAppMessages/Info.plist diff --git a/BrazeKit.podspec b/BrazeKit.podspec index 732d083f6b..51a23e9568 100644 --- a/BrazeKit.podspec +++ b/BrazeKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazeKit' - s.version = '5.6.3' + s.version = '5.6.4' s.summary = 'Braze Main SDK library providing support for analytics and push notifications.' s.homepage = 'https://braze.com' @@ -9,8 +9,8 @@ Pod::Spec.new do |s| s.authors = 'Braze, Inc.' s.source = { - :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.3/BrazeKit-CocoaPods.zip', - :sha256 => '85e3fba03575d2f7a0ce6700ebd937869239a795c628a2cc5fd2058bdd592200' + :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeKit-CocoaPods.zip', + :sha256 => '8029a5a48f7d91efb6d8150582c92445566ce1ba2c7e6048d13e64af53cc8f0a' } s.swift_version = '5.0' diff --git a/BrazeLocation.podspec b/BrazeLocation.podspec index 2a1c348ba2..3d1a4039d2 100644 --- a/BrazeLocation.podspec +++ b/BrazeLocation.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazeLocation' - s.version = '5.6.3' + s.version = '5.6.4' s.summary = 'Braze location library providing support for location analytics and geofence monitoring.' s.homepage = 'https://braze.com' @@ -9,8 +9,8 @@ Pod::Spec.new do |s| s.authors = 'Braze, Inc.' s.source = { - :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.3/BrazeLocation-CocoaPods.zip', - :sha256 => '7d59c5764459822d55040dda168abf6f90dd39a8ae7ef8c2c8df1ad9cb16641f' + :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeLocation-CocoaPods.zip', + :sha256 => 'f5fddf0bf389053d8e9e8eabe4600db2ef5ef8396e7b11430a65fac377d1522b' } s.swift_version = '5.0' @@ -21,5 +21,5 @@ Pod::Spec.new do |s| # Depends on BrazeKit because BrazeKit includes the internal _BrazeLocationClient symbols required # for linking against BrazeLocation. - s.dependency 'BrazeKit', '5.6.3' + s.dependency 'BrazeKit', '5.6.4' end diff --git a/BrazeNotificationService.podspec b/BrazeNotificationService.podspec index 819eec33a2..f1a6425341 100644 --- a/BrazeNotificationService.podspec +++ b/BrazeNotificationService.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazeNotificationService' - s.version = '5.6.3' + s.version = '5.6.4' s.summary = 'Braze notification service extension library providing support for Rich Push notifications.' s.homepage = 'https://braze.com' @@ -9,8 +9,8 @@ Pod::Spec.new do |s| s.authors = 'Braze, Inc.' s.source = { - :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.3/BrazeNotificationService-CocoaPods.zip', - :sha256 => 'fe116d58686797e3a47bde2c5e4da73c89d9aea7f6578c648b558c80dd2c99ed' + :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeNotificationService-CocoaPods.zip', + :sha256 => '0e5c6ecc1f19db1cb12ea1a7749ebc1265434178695121509c326ec14c87c102' } s.swift_version = '5.0' diff --git a/BrazePushStory.podspec b/BrazePushStory.podspec index 0cdec184c2..2e377b6666 100644 --- a/BrazePushStory.podspec +++ b/BrazePushStory.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazePushStory' - s.version = '5.6.3' + s.version = '5.6.4' s.summary = 'Braze notification content extension library providing support for Push Stories.' s.homepage = 'https://braze.com' @@ -9,8 +9,8 @@ Pod::Spec.new do |s| s.authors = 'Braze, Inc.' s.source = { - :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.3/BrazePushStory-CocoaPods.zip', - :sha256 => 'd959ffbb2503d59f701023b8391d0d210c9f0c93fc15ac0771a3cd07c0a1d665' + :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazePushStory-CocoaPods.zip', + :sha256 => 'f21f0c9655bb143790ac55e8ba105167b8ab7a5ef55df68992c0e61a91a24ecf' } s.swift_version = '5.0' diff --git a/BrazeUI.podspec b/BrazeUI.podspec index c241e38435..4ed4d324b8 100644 --- a/BrazeUI.podspec +++ b/BrazeUI.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazeUI' - s.version = '5.6.3' + s.version = '5.6.4' s.summary = 'Braze-provided user interface library for In-App Messages.' s.homepage = 'https://braze.com' @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.license = { :type => 'Commercial' } s.authors = 'Braze, Inc.' - s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '5.6.3' } + s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '5.6.4' } s.swift_version = '5.0' s.ios.deployment_target = '10.0' @@ -17,5 +17,5 @@ Pod::Spec.new do |s| s.source_files = 'Sources/BrazeUI/**/*.swift' s.resource_bundles = { 'BrazeUI' => 'Sources/BrazeUI/Resources/**/*' } - s.dependency 'BrazeKit', '5.6.3' + s.dependency 'BrazeKit', '5.6.4' end diff --git a/CHANGELOG.md b/CHANGELOG.md index b86e806b9f..abbe7b342f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +## 5.6.4 + +##### Fixed +- Fixes an issue preventing the execution of `BrazeDelegate` methods when setting the delegate using Objective-C. +- Fixes an issue where triggering an in-app message twice with the same event did not place the message on the in-app message stack under certain conditions. + +##### Added +- Adds the public `id` field to `Braze.InAppMessage.Data`. +- Adds `logImpression(using:)` and `logClick(buttonId:using:)` to both in-app messages and content cards, and adds `logDismissed(using:)` to content cards. + - It is recommended to continue using the associated `Context` to log impressions, clicks, and dismissals for the majority of use cases. +- Adds Swift concurrency to support async/await versions of the following public methods. These methods can be used as alternatives to their corresponding counterparts that use completion handlers: + - [`Braze.User.id()`] + - [`Braze.deviceId()`] + - [`ContentCards.requestRefresh()`] + - [`ContentCards.cardsStream`] as an alternative to [`ContentCards.subscribeToUpdates(_:)`] + +[`Braze.User.id()`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/user-swift.class/id() +[`Braze.deviceId()`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/deviceid() +[`ContentCards.requestRefresh()`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcards-swift.class/requestrefresh() +[`ContentCards.cardsStream`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcards-swift.class/cardsStream +[`ContentCards.subscribeToUpdates(_:)`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcards-swift.class/subscribetoupdates(_:) + ## 5.6.3 ##### Fixed @@ -6,7 +28,7 @@ ##### Changed - Improves error logging descriptions for HTTP requests and responses. - + ## 5.6.2 ##### Changed diff --git a/Examples/ObjC/Sources/ContentCards/Info.plist b/Examples/ObjC/Sources/ContentCards/Info.plist new file mode 100644 index 0000000000..0c015f1468 --- /dev/null +++ b/Examples/ObjC/Sources/ContentCards/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + ContentCards + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + UILaunchStoryboardName + LaunchScreen + + diff --git a/Examples/ObjC/Sources/InAppMessages/Info.plist b/Examples/ObjC/Sources/InAppMessages/Info.plist new file mode 100644 index 0000000000..4f97542122 --- /dev/null +++ b/Examples/ObjC/Sources/InAppMessages/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + InAppMessages + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + UILaunchStoryboardName + LaunchScreen + + diff --git a/Examples/Swift/Sources/ContentCards/Info.plist b/Examples/Swift/Sources/ContentCards/Info.plist new file mode 100644 index 0000000000..0c015f1468 --- /dev/null +++ b/Examples/Swift/Sources/ContentCards/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + ContentCards + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + UILaunchStoryboardName + LaunchScreen + + diff --git a/Examples/Swift/Sources/InAppMessages-Custom-UI/InAppMessageInfoViewController.swift b/Examples/Swift/Sources/InAppMessages-Custom-UI/InAppMessageInfoViewController.swift index 7791e3bbeb..348dad26b6 100644 --- a/Examples/Swift/Sources/InAppMessages-Custom-UI/InAppMessageInfoViewController.swift +++ b/Examples/Swift/Sources/InAppMessages-Custom-UI/InAppMessageInfoViewController.swift @@ -1,8 +1,6 @@ import UIKit import BrazeKit -let performClickAction = "Perform click action" - final class InAppMessageInfoViewController: UITableViewController { // Represents an in-app message property @@ -21,12 +19,10 @@ final class InAppMessageInfoViewController: UITableViewController { // MARK: - Properties let sections: [Section] - let message: Braze.InAppMessage // MARK: - Initialization init(message: Braze.InAppMessage) { - self.message = message sections = Self.messageSections(from: message) + Self.dataSections(from: message) super.init(style: .grouped) title = "In-App Message Info" @@ -90,33 +86,6 @@ final class InAppMessageInfoViewController: UITableViewController { sections[section].name } - // MARK: - UITableViewDelegate - - override func tableView( - _ tableView: UITableView, - didSelectRowAt indexPath: IndexPath - ) { - guard let braze = AppDelegate.braze else { return } - let field = sections[indexPath.section].fields[indexPath.row] - - if field.name == performClickAction { - // Trigger click action with custom UI - let context = Braze.InAppMessage.Context(message: message, using: braze) - context.logClick() - context.processClickAction(.url(URL(string: "https://www.braze.com")!, useWebView: false)) - } - } - - override func tableView( - _ tableView: UITableView, - willDisplay cell: UITableViewCell, - forRowAt indexPath: IndexPath - ) { - guard let braze = AppDelegate.braze else { return } - let context = Braze.InAppMessage.Context(message: message, using: braze) - context.logImpression() - } - // MARK: - Helpers /// The message specific sections (e.g. Slideup data, Modal data) @@ -186,8 +155,6 @@ final class InAppMessageInfoViewController: UITableViewController { break } - section.fields += [Field(name: performClickAction, value: "")] - return [section, buttonsSection, themesSection].compactMap { $0 } } diff --git a/Examples/Swift/Sources/InAppMessages/Info.plist b/Examples/Swift/Sources/InAppMessages/Info.plist new file mode 100644 index 0000000000..4f97542122 --- /dev/null +++ b/Examples/Swift/Sources/InAppMessages/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + InAppMessages + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + UILaunchStoryboardName + LaunchScreen + + diff --git a/Package.swift b/Package.swift index 63b6fccf38..dccf5c0793 100644 --- a/Package.swift +++ b/Package.swift @@ -26,8 +26,8 @@ let package = Package( targets: [ .binaryTarget( name: "BrazeKit", - url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.3/BrazeKit.zip", - checksum: "e1b435f3d8e399133d6cff4fd3b32db45aadc02ee5a33f6183c2d086b1afd546" + url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeKit.zip", + checksum: "cc6375e451a181804528945a811a850444ae2d892f140491910237648bbe19ed" ), .target( name: "BrazeKitResources", @@ -42,18 +42,18 @@ let package = Package( ), .binaryTarget( name: "BrazeLocation", - url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.3/BrazeLocation.zip", - checksum: "e131e33933872210be316b744b91a99b76a944ea0d8e5963ed365af09438e14c" + url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeLocation.zip", + checksum: "33a0900c0ca9a9e5b94b86b111595e83e80b3723be7c0e7cc9e99bb03eb7c2b4" ), .binaryTarget( name: "BrazeNotificationService", - url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.3/BrazeNotificationService.zip", - checksum: "be836f3b236c701a843b17a445052c3e85e98648b84880e4067096c51d660793" + url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeNotificationService.zip", + checksum: "32130b8da6bc00ce43ae2e495fd873cc1ec458b5c305d4bd9451cfe0d894a7f9" ), .binaryTarget( name: "BrazePushStory", - url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.3/BrazePushStory.zip", - checksum: "e7bc9c80f9a573add5f508c203450623bddd2e473f3d205c8809ff7548ffebb9" + url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazePushStory.zip", + checksum: "5b83874ae6eacf545c70e120655827976930da707e66297eba2f161bf5c1c089" ), ] ) diff --git a/README.md b/README.md index d58a874578..8071e6cbbd 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- Version: 5.6.3 + Version: 5.6.4