Releases: braze-inc/braze-swift-sdk
Releases · braze-inc/braze-swift-sdk
11.5.0
11.5.0
Fixed
Braze.banners.getBanner(for:_:)
now successfully returns a cachedBanner
object for the requested placement ID as long as a Banner Cards sync has ever succeeded for the current user.- Previously, it would log a warning and pass
nil
to the completion handler if a Banner Cards sync had not been completed for the current user during the current session specifically. - This change aligns behavior with the Android SDK.
- Previously, it would log a warning and pass
- Fixes an issue where images with the
"JPEG"
image type would sometimes not display in Push Stories. - Fixes an issue where an in-app message in a Braze-provided UI can be displayed for an ineligible user under rare conditions.
- This may occur if the in-app message was in the process of being displayed in the UI at the same time that the user was changed to a different user.
Added
- Adds
Braze.User.id
to access the current user identifier synchronously.- Deprecates
Braze.User.id() async
andBraze.User.id(queue:completion:)
in favor ofBraze.User.id
.- These methods will be removed fully in a future update.
- Deprecates
- Adds the optional parameter
userIDMatchBehavior
to the initializers ofBraze.InAppMessageRaw.Context
. This determines the behavior in the UI when the current identified user is different from the one that triggered the in-app message.- The default for Braze-provided UIs (
.enforce
) will enforce that the user ID matches the user ID that triggered the in-app message. If there is a mismatch, the in-app message will not be displayed. - For custom UIs, the default is
.ignore
and a mismatch will still display the in-app message.
- The default for Braze-provided UIs (
11.4.0
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
to distinguish between banner objects.- Deprecates
banner.id
in favor ofbanner.trackingId
.
- Deprecates
11.0.1
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.3.0
11.3.0
Fixed
- Fixes a behavior where calling the
logClick
bridge method in HTML in-app messages with""
as the button ID would log an error.- Instead, this would log an in-app message body click to match other platforms.
Added
- Adds support for the Braze Banner Cards product.
- For usage details, refer to our tutorial here.
11.2.0
11.2.0
Fixed
- Fixes the Objective-C
Braze.delegate
declaration to beweak
like the Swift variant.
Added
Braze.prepareForDelayedInitialization
now takes an optional parameteranalyticsBehavior: PushEnqueueBehavior
.- Braze uses this value to determine whether any Braze push payloads received before initialization should be processed once initialization is complete.
PushEnqueueBehavior.queue
will enqueue received push payloads to be processed upon initialization. This option is selected by default.PushEnqueueBehavior.drop
will drop received push payloads, ignoring them.
- Adds configuration properties to customize the
lineSpacing
,maxLineHeight
,minLineHeight
, andlineHeightMultiple
for the header and message texts in full and modal in-app messages. - Updates
BrazeContentCardUI.ViewController.Attributes.defaults
to be avar
to allow directly editing the property for convenience.
11.1.1
11.1.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.1.0
11.1.0
Fixed
- Fixes an issue introduced in
11.0.0
where the push token status would not always be reported in all circumstances. - Fixes a display bug where an in-app message would appear truncated after certain keyboard dismissal scenarios.
- Fixes a reference cycle in
Braze.NewsFeedCard.Context
that could prevent the card from being deallocated.
Added
- Adds a public initializer for
Braze.Notifications.Payload
.
11.0.0
11.0.0
Breaking
- Adds support for Swift 6 strict concurrency checking.
- Relevant public Braze classes and data types now conform to the
Sendable
protocol and can be safely used across concurrency contexts. - Main thread-only APIs are now marked with the
@MainActor
attribute. - We recommend using Xcode 16.0 or later to take advantage of these features while minimizing the number of warnings generated by the compiler. Previous versions of Xcode may still be used, but some features may generate warnings.
- Relevant public Braze classes and data types now conform to the
- When integrating push notification support manually, you may need to update the
UNUserNotificationCenterDelegate
conformance to use the@preconcurrency
attribute to prevent warnings.- Applying the
@preconcurrency
attribute on protocol conformance is only available in Xcode 16.0 or later. Reference our sample integration code here. - As of Xcode 16.0, Apple has not yet audited the
UNUserNotificationCenterDelegate
protocol for Swift concurrency.
extension AppDelegate: @preconcurrency UNUserNotificationCenterDelegate { // Your existing implementation }
- Applying the
- Updates the
SDWebImage
dependency inBrazeUICompat
and sample apps to5.19.7+
to support Swift 6 strict concurrency checking.
Fixed
- Fixes the push authorization status reporting to display the proper push token status on the Dashboard when a user has not explicitly accepted or declined push permissions.
10.3.1
10.3.0
10.3.0
Fixed
- Fixes the in-app message orientation validation logic, which prevented certain device classes from displaying messages under certain orientation configurations.
- Fixes the default behavior on full-screen in-app messages to display as modals only on tablet screen sizes.
- Previously, full-screen messages would erroneously default to modal presentations on some larger phones.
- Fixes a crash when dismissing a slideup in-app message before it has finished presenting.
- Fixes an issue on iOS 18.0+ where the in-app message UI would persist on the screen when attempting to dismiss the message before it has finished presenting.
- Updates custom attribute value, custom event, and purchase string validation to use a 255 character maximum instead of a 255 byte maximum.
Added
- The
Braze.set(identifierForAdvertiser:)
andBraze.set(identifierForVendor:)
methods now accept anil
parameter value to remove the identifiers from the user profile. - Adds additional safeguards to
Braze.Notifications.subscribeToUpdates
to ensure the same Push notification can't trigger the update closure multiple times.