Releases: braze-inc/braze-swift-sdk
Releases · braze-inc/braze-swift-sdk
10.1.0
10.1.0
Fixed
- Fixes an issue affecting the Objective-C variants of
BrazeDelegate
,BrazeContentCardUIViewControllerDelegate
andBrazeInAppMessageUIDelegate
.- When setting these delegates in Objective-C a second time, the delegate would end up being set to
nil
. - This issue has been resolved and the delegates can now be set multiple times without issue.
- When setting these delegates in Objective-C a second time, the delegate would end up being set to
Added
- Adds support for delayed SDK initialization, allowing you to create the Braze instance outside of
application(_:didFinishLaunchingWithOptions:)
.- The SDK can now be initialized asynchronously, while conserving the ability to process incoming Braze push notifications.
- Symbol documentation:
Braze.prepareForDelayedInitialization(pushAutomation:)
- Integration documentation: Delayed Initialization
- Sample app: PushNotifications-DelayedInitialization.
- Adds the ability to prevent showing an in-app message to a different user than the one that triggered the in-app message.
- To enable this feature, set
Braze.Configuration.preventInAppMessageDisplayForDifferentUser
totrue
(default:false
).
- To enable this feature, set
10.0.0
10.0.0
Breaking
- The following changes have been made when subscribing to Push events with
Braze.Notifications.subscribeToUpdates(payloadTypes:_:)
:- The
update
closure will now be triggered by both "Push Opened" and "Push Received" events by default. Previously, it would only be triggered by "Push Opened" events.- To continue subscribing only to "Push Opened" events, pass in
[.opened]
for the parameterpayloadTypes
. Alternatively, implement yourupdate
closure to check that thetype
from theBraze.Notifications.Payload
is.opened
.
- To continue subscribing only to "Push Opened" events, pass in
- When receiving a push notification with
content-available: true
, theBraze.Notifications.Payload.type
will now be.received
instead of.opened
.
- The
- Marks the following deprecated APIs as unavailable:
Braze.Configuration.Api.Flavor
Braze.Configuration.Api.flavor
Braze.Configuration.Api.SdkMetadata
Braze.Configuration.Api.addSdkMetadata(_:)
Braze.ContentCard.ClickAction.uri(_:useWebview:)
Braze.ContentCard.ClickAction.uri
Braze.InAppMessage.ClickAction.uri(_:useWebview:)
Braze.InAppMessage.ClickAction.uri
Braze.InAppMessage.ModalImage.imageUri
Braze.InAppMessage.Full.imageUri
Braze.InAppMessage.FullImage.imageUri
Braze.InAppMessage.Themes.default
Braze.deviceId(queue:completion:)
Braze._objc_deviceId(completion:)
Braze.deviceId()
Braze.User.setCustomAttributeArray(key:array:fileID:line:)
Braze.User.addToCustomAttributeArray(key:value:fileID:line:)
Braze.User.removeFromCustomAttributeArray(key:value:fileID:line:)
Braze.User._objc_addToCustomAttributeArray(key:value:)
Braze.User._objc_removeFromCustomAttributeArray(key:value:)
gifViewProvider
GifViewProvider.default
- Removes the deprecated APIs:
Braze.Configuration.DeviceProperty.pushDisplayOptions
Braze.InAppMessageRaw.Context.Error.extraProcessClickAction
- Removes the deprecated
BrazeLocation
class in favor ofBrazeLocationProvider
.
Fixed
- Fixes a crash when handling a scheme-based deep link containing a registered
applink
domain (e.g.applinks:example.com
with a deep link toapp://example.com/path
).
Added
- Adds support to subscribe to "Push Received" events via
Braze.Notifications.subscribeToUpdates(payloadTypes:_:)
.- The following notifications will trigger this subscription:
- Notifications received in the foreground
- Notifications with the field
content-available: true
received in the foreground or background
- The following notifications will not trigger this subscription:
- Notifications received while terminated
- Notifications received in the background without the field
content-available: true
- The new parameter
payloadTypes
will allow you to subscribe to "Push Opened" events, "Push Received" events, or both. If the parameter is omitted, it will subscribe to both by default. - If you are using manual push integration, you will need to first implement
UNUserNotificationCenter.userNotificationCenter(_:willPresent:withCompletionHandler:)
, and make sure to callBraze.Notifications.handleForegroundNotification(notification:)
within your implementation. Then, usesubscribeToUpdates
as noted above. See our guide on push notification integration for more info.
- The following notifications will trigger this subscription:
- Adds the public property
Braze.Notifications.Payload.type
. - Adds the
Braze.WebViewBridge.ScriptMessageHandler.init(braze:)
initializer enabling a simpler way to initialize theScriptMessageHandler
for adding it to user-provided web views.
9.3.1
9.3.1
Fixed
- Fixes an issue where the
Braze.FeatureFlag.subscribeToUpdates(_:)
callback was not triggered at app launch when the cached feature flags matched the remote feature flags. - Fixes an issue in Objective-C projects where the return value of
Braze.FeatureFlag.jsonProperty(key:)
would incorrectly encode any entry value equal tonull
under certain conditions.[String: Any]
dictionaries returned by the Swift API will now dropnull
values.NSDictionary
objects returned by the Objective-C API will now encodenull
values asNSNull
.
9.3.0
9.3.0
Added
- Adds Objective-C support for the
BrazeInAppMessageUIDelegate.inAppMessage(_:prepareWith:)
method.- Customization of
ViewAttributes
via theattributes
property is not available in the Objective-C version ofPresentationContextRaw
.
- Customization of
- Adds
Braze.FeatureFlag.jsonProperty(key:type:decoder:)
to decodejsonobject
type Feature Flag properties into customDecodable
types. - Deprecates the existing Feature Flag APIs, to be removed in a future version:
Braze.FeatureFlag.jsonStringProperty(key:)
has been deprecated.Braze.FeatureFlag.jsonObjectProperty(key:)
has been deprecated in favor ofBraze.FeatureFlag.jsonProperty(key:)
.
Fixed
- Fixes an issue where the
preferredOrientation
on the presentation context of an in-app message would not be respected.
9.2.0
9.2.0
Added
- Adds the
openNewWindowLinksInBrowser
configuration (default:false
) toBraze.ModalContext
.- Set this value in the
braze(_:willPresentModalWithContext:)
method of yourBrazeDelegate
to specify whether to launch the device browser to open web view hyperlinks that normally open a new tab or window.
- Set this value in the
Fixed
- Fixes an issue with the automatic push integration feature that could cause the SDK not to send the device token to Braze.
- Fixes an issue that prevented external links, which open in a new tab, from being activated in presented web views.
9.1.0
9.1.0
Added
- Adds support for 3 new Feature Flag property types and various APIs for accessing them:
Braze.FeatureFlag.timestampProperty(key:)
for accessingInt
Unix UTC millisecond timestamps.Braze.FeatureFlag.imageProperty(key:)
for accessing image URLs asString
s.Braze.FeatureFlag.jsonObjectProperty(key:)
for accessing JSONs as[String:Any]
dictionaries.Braze.FeatureFlag.jsonStringProperty(key:)
for accessing JSONs asString
s.
- Adds safeguards when reading the device model.
Fixed
- Fixes the duplicate symbols compilation errors and runtime warnings that may occur under specific conditions when integrating
BrazeKit
and eitherBrazeNotificationService
orBrazePushStory
via CocoaPods.
9.0.0
9.0.0
Breaking
- Removes the default privacy tracking domains from the
BrazeKit
privacy manifest.- If you are using the Braze data tracking features, you will need to manually add your tracking endpoint to your app-level privacy manifest.
- Refer to the updated tutorial for integration guidance.
- Removes the deprecated
BrazeDelegate.braze(_:sdkAuthenticationFailedWithError)
method in favor ofBrazeSDKAuthDelegate.braze(_:sdkAuthenticationFailedWithError)
.- This method was originally deprecated in release
5.14.0
. - Failing to switch to the new delegate method will not trigger a compiler error; instead, the
BrazeDelegate.braze(_:sdkAuthenticationFailedWithError)
method you define will simply not be called.
- This method was originally deprecated in release
Fixed
- Adds the missing
NSPrivacyCollectedDataTypes
key to theBrazePushStory
privacy manifest.
8.4.0
8.4.0
Added
- Expands Geofences behavior in the background while "When In Use" authorization is selected:
- Adds the
Braze.Location.Configuration.allowBackgroundGeofenceUpdates
property to toggle whether geofences should be updated in the background.- When using this setting, verify that you have enabled the Location updates background mode.
- Adds the
Braze.Location.Configuration.distanceFilter
property to configure the minimum distance sensitivity for triggering a location update.
- Adds the
- Adds support for the
message_extras
Liquid tag for in-app messages.
8.3.0
8.3.0
Added
- Adds early access for a third alternative repository which provides all Braze modules as mergeable XCFrameworks. For instructions on how to leverage it, refer to the repository README:
Fixed
- Adds a missing privacy manifest for
BrazePushStory
. - Fixes an invalid privacy manifest warning in
BrazeLocation
when submitting to the App Store as a dynamic XCFramework. - Fixes an issue where already enqueued in-app messages would not be removed from the stack after subsequent
.reenqueue
and.discard
display actions. - Fixes an issue preventing retried requests from using an updated SDK authentication token until a new request was scheduled for processing.
- Purchases, custom events, and nested custom user attributes can now include properties with values of any type conforming to
BinaryInteger
(Int64
,UInt16
, etc).- All values will be cast to
Int
before being logged. - This resolves an issue with a bugfix in
7.6.0
.
- All values will be cast to