Skip to content

Commit

Permalink
Version 11.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lowip committed Dec 12, 2024
1 parent 2852dfb commit fc575be
Show file tree
Hide file tree
Showing 17 changed files with 77 additions and 52 deletions.
6 changes: 3 additions & 3 deletions BrazeKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BrazeKit'
s.version = '11.3.0'
s.version = '11.4.0'
s.summary = 'Braze Main SDK library providing support for analytics and push notifications.'

s.homepage = 'https://braze.com'
Expand All @@ -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/11.3.0/BrazeKit.zip',
:sha256 => '0a2cdaef910c1154f1cd62c47db782dd7b66e2f0e9a8cdb9745f2516bbc7b707'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/BrazeKit.zip',
:sha256 => '809ce3973f8ebfc65ddf5b7aac8785fb9b1507c2e15e1e64dea9b3f583bb5fa7'
}

s.swift_version = '5.0'
Expand Down
8 changes: 4 additions & 4 deletions BrazeKitCompat.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'BrazeKitCompat'
s.version = '11.3.0'
s.version = '11.4.0'
s.summary = 'Compatibility library for users migrating from AppboyKit.'

s.homepage = 'https://braze.com'
s.documentation_url = 'https://braze-inc.github.io/braze-swift-sdk/documentation/brazekitcompat/'
s.license = { :type => 'Commercial' }
s.authors = 'Braze, Inc.'

s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '11.3.0' }
s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '11.4.0' }

s.swift_version = '5.0'
s.ios.deployment_target = '12.0'
Expand All @@ -18,8 +18,8 @@ Pod::Spec.new do |s|
s.public_header_files = 'Sources/BrazeKitCompat/include/*.h'
s.static_framework = true

s.dependency 'BrazeKit', '11.3.0'
s.dependency 'BrazeLocation', '11.3.0'
s.dependency 'BrazeKit', '11.4.0'
s.dependency 'BrazeLocation', '11.4.0'

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end
8 changes: 4 additions & 4 deletions BrazeLocation.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BrazeLocation'
s.version = '11.3.0'
s.version = '11.4.0'
s.summary = 'Braze location library providing support for location analytics and geofence monitoring.'

s.homepage = 'https://braze.com'
Expand All @@ -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/11.3.0/BrazeLocation.zip',
:sha256 => 'ca6f518ca8017d11584c0897a701f52f20620b508208d6da68447d4e40a38ffa'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/BrazeLocation.zip',
:sha256 => 'f957e6fb75ded976f7de565b4be0420d3c2912d4261f436e87ce353fc0b6b752'
}

s.swift_version = '5.0'
Expand All @@ -21,7 +21,7 @@ Pod::Spec.new do |s|
s.vendored_framework = 'BrazeLocation.xcframework'
s.resource_bundles = { 'BrazeLocation' => ['Sources/BrazeLocationResources/Resources/**/*'] }

s.dependency 'BrazeKit', '11.3.0'
s.dependency 'BrazeKit', '11.4.0'

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end
6 changes: 3 additions & 3 deletions BrazeNotificationService.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BrazeNotificationService'
s.version = '11.3.0'
s.version = '11.4.0'
s.summary = 'Braze notification service extension library providing support for Rich Push notifications.'

s.homepage = 'https://braze.com'
Expand All @@ -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/11.3.0/BrazeNotificationService.zip',
:sha256 => '491f300cd9d69e00050b0480dd096a9fac742cebbf2f024fc0b5535a88e8d19c'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/BrazeNotificationService.zip',
:sha256 => '6804bfaf9c5efe55c109a6d63be264f9abc83acd8484718f9ddaef344f1371bf'
}

s.swift_version = '5.0'
Expand Down
6 changes: 3 additions & 3 deletions BrazePushStory.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BrazePushStory'
s.version = '11.3.0'
s.version = '11.4.0'
s.summary = 'Braze notification content extension library providing support for Push Stories.'

s.homepage = 'https://braze.com'
Expand All @@ -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/11.3.0/BrazePushStory.zip',
:sha256 => '13ad2cee5f3ae70ee581f257b64dae0010c849370004a979cbe2d7b3b481efda'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/BrazePushStory.zip',
:sha256 => '2e945d6f17812202a951a8598071c278acf6d2a9962e49abb27a8134a28e7ae0'
}

s.swift_version = '5.0'
Expand Down
6 changes: 3 additions & 3 deletions BrazeUI.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'BrazeUI'
s.version = '11.3.0'
s.version = '11.4.0'
s.summary = 'Braze-provided user interface library for In-App Messages and Content Cards.'

s.homepage = 'https://braze.com'
s.documentation_url = 'https://braze-inc.github.io/braze-swift-sdk/documentation/brazeui/'
s.license = { :type => 'Commercial' }
s.authors = 'Braze, Inc.'

s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '11.3.0' }
s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '11.4.0' }

s.swift_version = '5.0'
s.ios.deployment_target = '12.0'
Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.resource_bundles = { 'BrazeUI' => ['Sources/BrazeUI/Resources/**/*'] }
s.static_framework = true

s.dependency 'BrazeKit', '11.3.0'
s.dependency 'BrazeKit', '11.4.0'

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end
6 changes: 3 additions & 3 deletions BrazeUICompat.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'BrazeUICompat'
s.version = '11.3.0'
s.version = '11.4.0'
s.summary = 'Compatibility UI library for users migrating from AppboyUI.'

s.homepage = 'https://braze.com'
s.documentation_url = 'https://braze-inc.github.io/braze-swift-sdk/documentation/brazeui/'
s.license = { :type => 'Commercial' }
s.authors = 'Braze, Inc.'

s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '11.3.0' }
s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '11.4.0' }

s.swift_version = '5.0'
s.ios.deployment_target = '12.0'
Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.resource_bundles = { 'BrazeUICompat' => 'Sources/BrazeUICompat/*/Resources/**/*.*' }
s.static_framework = true

s.dependency 'BrazeKitCompat', '11.3.0'
s.dependency 'BrazeKitCompat', '11.4.0'
s.dependency 'SDWebImage', '>= 5.19.7', '< 6'

s.user_target_xcconfig = { 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES' }
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 11.4.0

##### Fixed
- Fixes an issue where the SDK could hang during initialization if previous sessions generated a large number of geofence refreshes. This hang could sometimes lead to a crash by blocking the main thread for an extended period.
- Fixes an issue where the triggering of in-app messages could be delayed in cases where requests for updated in-app message triggers are also delayed due to rate limiting.
- Adds additional safeguards to ensure that ongoing network requests are dropped when changing users mid-flight.

##### Added
- When Content Cards, Feature Flags, or Banner Cards go from enabled to disabled, the stored data is removed from cache.
- Adds [`banner.trackingId`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/banner/trackingid) to distinguish between banner objects.
- Deprecates `banner.id` in favor of `banner.trackingId`.

## 11.3.0

##### Fixed
Expand Down Expand Up @@ -38,6 +50,11 @@
##### Added
- Adds a public initializer for `Braze.Notifications.Payload`.

## 11.0.1

##### Fixed
- Fixes an issue introduced in `11.0.0` where the push subscription status would be sent to the backend with an inaccurate value at startup, causing an unexpected subscription state. The SDK now sends up the accurate subscription status at each startup.

## 11.0.0

⚠️ **Important:** This version has a known issue related to push subscription status. Upgrade to version `11.1.1` instead.
Expand Down
6 changes: 3 additions & 3 deletions Examples/ObjC/Examples-SwiftPM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@
mainGroup = D8CC2266D736859D7DD9A8FF;
packageReferences = (
9928D5150C45879A982BA1C6 /* XCRemoteSwiftPackageReference "SDWebImage" */,
90D8318C2DB3CED6610DD38C /* XCLocalSwiftPackageReference "/Users/jerielng/swift-sdk/.build/braze/release/braze-swift-sdk" */,
6764A035A4A67CE751802C3E /* XCLocalSwiftPackageReference "/Users/louis.bur/Developer/swift-sdk/.build/braze/release/braze-swift-sdk" */,
);
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -2269,9 +2269,9 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCLocalSwiftPackageReference section */
90D8318C2DB3CED6610DD38C /* XCLocalSwiftPackageReference "/Users/jerielng/swift-sdk/.build/braze/release/braze-swift-sdk" */ = {
6764A035A4A67CE751802C3E /* XCLocalSwiftPackageReference "/Users/louis.bur/Developer/swift-sdk/.build/braze/release/braze-swift-sdk" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = "/Users/jerielng/swift-sdk/.build/braze/release/braze-swift-sdk";
relativePath = "/Users/louis.bur/Developer/swift-sdk/.build/braze/release/braze-swift-sdk";
};
/* End XCLocalSwiftPackageReference section */

Expand Down
4 changes: 4 additions & 0 deletions Examples/ObjC/Sources/Location/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<string>Location Authorization - Always / When in Use</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location Authorization - When in Use</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Examples/ObjC/manual-integration-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ ! -f "manual-integration-setup.sh" ]; then
fi

# Constants
url="https://github.com/braze-inc/braze-swift-sdk/releases/download/11.3.0/braze-swift-sdk-prebuilt.zip"
url="https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/braze-swift-sdk-prebuilt.zip"

echo "" "Cleaning up"
rm -rf braze-swift-sdk-prebuilt
Expand Down
6 changes: 3 additions & 3 deletions Examples/Swift/Examples-SwiftPM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@
mainGroup = D8CC2266D736859D7DD9A8FF;
packageReferences = (
9928D5150C45879A982BA1C6 /* XCRemoteSwiftPackageReference "SDWebImage" */,
90D8318C2DB3CED6610DD38C /* XCLocalSwiftPackageReference "/Users/jerielng/swift-sdk/.build/braze/release/braze-swift-sdk" */,
6764A035A4A67CE751802C3E /* XCLocalSwiftPackageReference "/Users/louis.bur/Developer/swift-sdk/.build/braze/release/braze-swift-sdk" */,
);
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -2261,9 +2261,9 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCLocalSwiftPackageReference section */
90D8318C2DB3CED6610DD38C /* XCLocalSwiftPackageReference "/Users/jerielng/swift-sdk/.build/braze/release/braze-swift-sdk" */ = {
6764A035A4A67CE751802C3E /* XCLocalSwiftPackageReference "/Users/louis.bur/Developer/swift-sdk/.build/braze/release/braze-swift-sdk" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = "/Users/jerielng/swift-sdk/.build/braze/release/braze-swift-sdk";
relativePath = "/Users/louis.bur/Developer/swift-sdk/.build/braze/release/braze-swift-sdk";
};
/* End XCLocalSwiftPackageReference section */

Expand Down
4 changes: 4 additions & 0 deletions Examples/Swift/Sources/Location/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<string>Location Authorization - Always / When in Use</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location Authorization - When in Use</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Examples/Swift/manual-integration-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ ! -f "manual-integration-setup.sh" ]; then
fi

# Constants
url="https://github.com/braze-inc/braze-swift-sdk/releases/download/11.3.0/braze-swift-sdk-prebuilt.zip"
url="https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/braze-swift-sdk-prebuilt.zip"

echo "" "Cleaning up"
rm -rf braze-swift-sdk-prebuilt
Expand Down
16 changes: 8 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ let package = Package(
targets: [
.binaryTarget(
name: "BrazeKit",
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/11.3.0/BrazeKit.zip",
checksum: "0a2cdaef910c1154f1cd62c47db782dd7b66e2f0e9a8cdb9745f2516bbc7b707"
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/BrazeKit.zip",
checksum: "809ce3973f8ebfc65ddf5b7aac8785fb9b1507c2e15e1e64dea9b3f583bb5fa7"
),
.target(
name: "BrazeKitResources",
Expand All @@ -67,8 +67,8 @@ let package = Package(
),
.binaryTarget(
name: "BrazeLocation",
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/11.3.0/BrazeLocation.zip",
checksum: "ca6f518ca8017d11584c0897a701f52f20620b508208d6da68447d4e40a38ffa"
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/BrazeLocation.zip",
checksum: "f957e6fb75ded976f7de565b4be0420d3c2912d4261f436e87ce353fc0b6b752"
),
.target(
name: "BrazeLocationResources",
Expand All @@ -78,13 +78,13 @@ let package = Package(
),
.binaryTarget(
name: "BrazeNotificationService",
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/11.3.0/BrazeNotificationService.zip",
checksum: "491f300cd9d69e00050b0480dd096a9fac742cebbf2f024fc0b5535a88e8d19c"
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/BrazeNotificationService.zip",
checksum: "6804bfaf9c5efe55c109a6d63be264f9abc83acd8484718f9ddaef344f1371bf"
),
.binaryTarget(
name: "BrazePushStory",
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/11.3.0/BrazePushStory.zip",
checksum: "13ad2cee5f3ae70ee581f257b64dae0010c849370004a979cbe2d7b3b481efda"
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/11.4.0/BrazePushStory.zip",
checksum: "2e945d6f17812202a951a8598071c278acf6d2a9962e49abb27a8134a28e7ae0"
),
.target(
name: "BrazePushStoryResources",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<p align="center">
<a href="https://github.com/braze-inc/braze-swift-sdk/releases">
<img src="https://badgen.net/badge/version/11.3.0/blue" alt="Version: 11.3.0">
<img src="https://badgen.net/badge/version/11.4.0/blue" alt="Version: 11.4.0">
</a>
<a href="#">
<img src="https://badgen.net/badge/platforms/iOS%20%7C%20visionOS%20%7C%20tvOS%20%7C%20Mac%20Catalyst/orange"
Expand Down
24 changes: 12 additions & 12 deletions Sources/BrazeUI/BannerUI/BannersImpressionTracker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension BrazeBannerUI {

/// Banner views currently tracked for impression logging.
///
/// Banner views are tracked and managed with their banner IDs (tracking string).
/// Banner views are tracked and managed with their banner tracking IDs.
var trackedBanners: NSMapTable<NSString, BrazeBannerUI.BannerUIView> {
get { lock.sync { _trackedBanners } }
set { lock.sync { _trackedBanners = newValue } }
Expand All @@ -50,7 +50,7 @@ extension BrazeBannerUI {
}
private var _sessionSubscriber: Braze.Cancellable?

/// The banner IDs that have been viewed this session.
/// The banner tracking IDs that have been viewed this session.
var viewedInSessionBanners: Set<String> {
get { lock.sync { _viewedInSessionBanners } }
set { lock.sync { _viewedInSessionBanners = newValue } }
Expand Down Expand Up @@ -83,11 +83,11 @@ extension BrazeBannerUI {
///
/// - Parameter view: The Braze banner view.
public func trackView(_ view: BrazeBannerUI.BannerUIView) {
guard let bannerId = view.banner?.id,
!viewedInSessionBanners.contains(bannerId)
guard let trackingId = view.banner?.trackingId,
!viewedInSessionBanners.contains(trackingId)
else { return }

trackedBanners.setObject(view, forKey: bannerId as NSString)
trackedBanners.setObject(view, forKey: trackingId as NSString)
startVisibilityTracking()
}

Expand All @@ -98,7 +98,7 @@ extension BrazeBannerUI {
isCurrentlyTracking = true
visibilityTracker = VisibilityTracker<String>(
interval: 0.1,
visibleIdentifiers: bannerIdentifiers,
visibleIdentifiers: bannerTrackingIdentifiers,
visibleForInterval: logBannerImpression
)
visibilityTracker?.start()
Expand All @@ -122,7 +122,7 @@ extension BrazeBannerUI {

extension BrazeBannerUI.BannersImpressionTracker {

func bannerIdentifiers() -> [String] {
func bannerTrackingIdentifiers() -> [String] {
return trackedBanners.keyEnumerator().allObjects.compactMap { key in
guard let nsStringKey = key as? NSString,
let view = trackedBanners.object(forKey: nsStringKey)
Expand All @@ -133,14 +133,14 @@ extension BrazeBannerUI.BannersImpressionTracker {
}
}

func logBannerImpression(bannerId: String) {
guard let bannerView = trackedBanners.object(forKey: bannerId as NSString),
let actualBannerId = bannerView.banner?.id,
!viewedInSessionBanners.contains(actualBannerId)
func logBannerImpression(trackingId: String) {
guard let bannerView = trackedBanners.object(forKey: trackingId as NSString),
let actualTrackingId = bannerView.banner?.trackingId,
!viewedInSessionBanners.contains(actualTrackingId)
else { return }

bannerView.logImpression()
viewedInSessionBanners.insert(actualBannerId)
viewedInSessionBanners.insert(actualTrackingId)

// All banners that were visible are already tracked
let allKeys = trackedBanners.keyEnumerator().allObjects.compactMap { $0 as? String }
Expand Down

0 comments on commit fc575be

Please sign in to comment.