diff --git a/BrazeKit.podspec b/BrazeKit.podspec index 053fa3791a..dc24f750ad 100644 --- a/BrazeKit.podspec +++ b/BrazeKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazeKit' - s.version = '5.6.0' + s.version = '5.6.1' 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.0/BrazeKit-CocoaPods.zip', - :sha256 => 'c35fa043e86919936cae61e191c95df9b03e95c0aac2e797b4d26e20f21786e3' + :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.1/BrazeKit-CocoaPods.zip', + :sha256 => '5df6e58cf7c67529b678bd40f0e5394e8c36922840f80b90b5fb2299fc7daaff' } s.swift_version = '5.0' diff --git a/BrazeLocation.podspec b/BrazeLocation.podspec index e276def8ca..a799d99492 100644 --- a/BrazeLocation.podspec +++ b/BrazeLocation.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazeLocation' - s.version = '5.6.0' + s.version = '5.6.1' 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.0/BrazeLocation-CocoaPods.zip', - :sha256 => '185f30e2b993ce39ee1f6053bf7f794db1b6d851ceff48777fb0fd0d5fabce84' + :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.1/BrazeLocation-CocoaPods.zip', + :sha256 => 'cf16e47b6b8b92dcfebdcb8ae56a5476e771a96acfe9064214a7fc93e2877ab0' } 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.0' + s.dependency 'BrazeKit', '5.6.1' end diff --git a/BrazeNotificationService.podspec b/BrazeNotificationService.podspec index 70d651c5b3..2441619343 100644 --- a/BrazeNotificationService.podspec +++ b/BrazeNotificationService.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazeNotificationService' - s.version = '5.6.0' + s.version = '5.6.1' 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.0/BrazeNotificationService-CocoaPods.zip', - :sha256 => '366538682b5d6268246733366b69689cb19c175b450747f9bd675a6df830bf73' + :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.1/BrazeNotificationService-CocoaPods.zip', + :sha256 => 'cbf5266d95f00697facd00104311be493d41a31a631cbf8c53a3854bc7d7f3b6' } s.swift_version = '5.0' diff --git a/BrazePushStory.podspec b/BrazePushStory.podspec index 9eb8cc9809..fd93a66191 100644 --- a/BrazePushStory.podspec +++ b/BrazePushStory.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazePushStory' - s.version = '5.6.0' + s.version = '5.6.1' 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.0/BrazePushStory-CocoaPods.zip', - :sha256 => 'c55cd87e925d56a834d606e78e3ad5b54fb3c683ce92be58c5f9a043cf748b1c' + :http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.1/BrazePushStory-CocoaPods.zip', + :sha256 => 'c7b71b96745388ba15df9b128a01c38fd4574237f9561d4bdadb90d62c1adc65' } s.swift_version = '5.0' diff --git a/BrazeUI.podspec b/BrazeUI.podspec index 2af59ca860..25650656ac 100644 --- a/BrazeUI.podspec +++ b/BrazeUI.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'BrazeUI' - s.version = '5.6.0' + s.version = '5.6.1' 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.0' } + s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '5.6.1' } 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.0' + s.dependency 'BrazeKit', '5.6.1' end diff --git a/CHANGELOG.md b/CHANGELOG.md index 41455abd04..ca4e4b863d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 5.6.1 + +##### Added +- Adds the public initializers `Braze.ContentCard.Context(card:using:)` and `Braze.InAppMessage.Context(message:using:)`. + ## 5.6.0 ##### Fixed 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-Custom-UI/CardsInfoViewController.swift b/Examples/Swift/Sources/ContentCards-Custom-UI/CardsInfoViewController.swift index 64c7141933..d8a74641ed 100644 --- a/Examples/Swift/Sources/ContentCards-Custom-UI/CardsInfoViewController.swift +++ b/Examples/Swift/Sources/ContentCards-Custom-UI/CardsInfoViewController.swift @@ -79,8 +79,6 @@ final class CardsInfoViewController: UITableViewController { return cell } - // MARK: - UITableViewDelegate - override func tableView( _ tableView: UITableView, titleForHeaderInSection section: Int 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 70f26c68cb..7791e3bbeb 100644 --- a/Examples/Swift/Sources/InAppMessages-Custom-UI/InAppMessageInfoViewController.swift +++ b/Examples/Swift/Sources/InAppMessages-Custom-UI/InAppMessageInfoViewController.swift @@ -1,6 +1,8 @@ import UIKit import BrazeKit +let performClickAction = "Perform click action" + final class InAppMessageInfoViewController: UITableViewController { // Represents an in-app message property @@ -19,10 +21,12 @@ 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" @@ -79,8 +83,6 @@ final class InAppMessageInfoViewController: UITableViewController { return cell } - // MARK: - UITableViewDelegate - override func tableView( _ tableView: UITableView, titleForHeaderInSection section: Int @@ -88,6 +90,33 @@ 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) @@ -156,6 +185,9 @@ final class InAppMessageInfoViewController: UITableViewController { @unknown default: 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 4e819cbe17..590e6c060c 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.0/BrazeKit.zip", - checksum: "c86831ad7bd173f75d25833f6e6648ff3f021eebd41224f7c0c9880521ba8b0c" + url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.1/BrazeKit.zip", + checksum: "28fd4d9a1544a94e75d3473fec69ccb59d2d026a350ef861552dcb3899804e23" ), .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.0/BrazeLocation.zip", - checksum: "30bc222ead44126b8f71a73de2f1cced8db57317b9a51a61f3dcb9930d31fb68" + url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.1/BrazeLocation.zip", + checksum: "02d9216d3c149f47719a50e5aa69343307fc95db744bc9a1ecaec83e3deef8f3" ), .binaryTarget( name: "BrazeNotificationService", - url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.0/BrazeNotificationService.zip", - checksum: "26b92b5b17df840b7a0f08d2ac56d04dc4e415a16cd8da38144c0cd0600efff4" + url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.1/BrazeNotificationService.zip", + checksum: "7518d3452ea5672a38e76eb86c935a926b967b2ce6e3038e471e25295a06bfbd" ), .binaryTarget( name: "BrazePushStory", - url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.0/BrazePushStory.zip", - checksum: "f7af4633a4ebd036c7beeecc84ef9289b6e393c590ea726d15aa6359befa71e4" + url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.1/BrazePushStory.zip", + checksum: "d44a3718886a6e6d19328a814d38e5fe692d7ff7eb9758f846e1a56979ae5568" ), ] ) diff --git a/README.md b/README.md index c47253c9d4..f2f5eb8f36 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- Version: 5.6.0 + Version: 5.6.1