Releases: BatchLabs/Batch-iOS-SDK
2.1.0
Compiles with Xcode 16.0
Batch requires Xcode 16.0 and iOS 13.0 or higher
Profile
- Added
setPhoneNumber
API to theBatchProfileEditor
class. This requires to have a user identifier registered or to call theidentify
method beforehand. - Added
setSMSMarketingSubscriptionState
API to theBatchProfileEditor
class. - Strengthened custom user identifier validation on
identify
API to avoid unintended values.
2.0.2
Compiles with Xcode 15.3
Batch requires Xcode 15.3 and iOS 13.0 or higher
Core
- Due to CocoaPod bugs, we removed Code Signing and Mergeable Library support from Batch when installed via CocoaPods. If those are important to you, please use Swift Package Manager or manually integrate the framework.
2.0.1
Compiles with Xcode 15.3
Batch requires Xcode 15.3 and iOS 13.0 or higher
Event
- Fixed an issue where tracking an event without custom attributes wasn't sent.
2.0.0
This is a major release, please see our migration guide for more info on how to update your current Batch implementation.
Batch requires Xcode 15.3 and iOS 13.0 or higher
Linking
- Dropped support for iOS 12 and lower.
- Batch is now distributed as a dynamic framework. You can now safely link Batch between multiple framework targets!
- Batch is now a mergeable dynamic library. The additional metadata induced by this feature makes the XCFramework distribution
heavier, but has no effect in the final size of Batch in your app once compiled.
visionOS
This version introduces visionOS support. Some features are still unsupported, like:
- In-App messaging and mobile landings are unavailable.
- In-App rating is not supported on visionOS due to an OS limitation.
Core
All deprecated APIs in the SDK v1 have been removed and some others have been renamed/reworked to feel Swift native.
- The
Batch
class has been renamed toBatchSDK
. - Batch has dropped the support for IDFA. You can no longer set an advertising id to Batch and all related APIs have been removed.
- Removed deprecated method
setUseIDFA
which was a no-op. - Removed method
setLoggerDelegate
, which has been replaced by theloggerDelegate
property. - Removed method
setAssociatedDomains
, which has been replaced by theassociatedDomains
property. - Removed method
isOptedOut
, which has been replaced by theisOptedOut
property. - Removed method
isRunningInDevelopmentMode
with no equivalent. - Removed method
handleURL
with no equivalent. - Removed method
setUseAdvancedDeviceInformation
, you should now use the addedupdateAutomaticDataCollection
API. - Renamed method
debugViewController
tomakeDebugViewController
. - Removed warning about unconfigured App Groups.
- Added
setDisabledMigrations(migrations:)
to explicitly disable profile's data migrations when running the SDK V2 for the first time when your app belongs to a project. - Added
updateAutomaticDataCollection(editor:)
to fine-tune the data sent by the SDK since Batch will not resolve the user's location/region and will not send the device type by default.
Push
- Removed deprecated method
setupPush
, which was a no-op. - Removed the ability to register notification categories using Batch. Please use the system API.
- Removed deprecated method
registerForRemoteNotifications
. - Removed deprecated method
registerForRemoteNotificationsWithCategories
. - Removed method
setNotificationsCategories
.
- Removed deprecated method
- Removed deprecated method
handleNotification
. - Removed method
handleNotification:actionIdentifier
. - Removed method
enableAutomaticDeeplinkHandling
, which has been replaced by theenableAutomaticDeeplinkHandling
property. - Removed method
lastKnownPushToken
, which has been replaced by thelastKnownPushToken
property. - Added async variants of
BatchPush.requestNotificationAuthorization()
andrequestProvisionalNotificationAuthorization()
. In non async Swift code and Objective-C, they are exposed as variants with a completion handler:BatchPush.requestNotificationAuthorization(completionHandler:)
/[BatchPush requestNotificationAuthorizationWithCompletionHandler:]
.
Note: In async Swift code, this is a breaking change as the language will force you to use the async variant. If you want to ignore the result, use:let _ = try? await BatchPush.requestNotificationAuthorization()
. - Removed pre-iOS 10
UINotification
related methods.
UNUserNotification and its related callbacks have been the only supported way to integrate Batch for a while as legacy
methods lead to unexpected behaviour.- Removed deprecated method
handleRegisterUserNotificationSettings
.
- Removed deprecated method
- Added helpers to extract Batch notification information from UNNotification instances.
- Added method
isBatchNotification
- Added method
deeplinkFromNotification
- Added method
BatchUNUserNotificationCenterDelegate
now defaults to showing foreground notifications.
User
Most of all user's related APIs have been removed and replaced with their equivalent in the new BatchProfile
module.
Only the reading methods are still present for backward-compatibility but keep in mind these methods are only about the installation data and not your Profile since it may be updated from another source.
- Removed deprecated class
BatchUserProfile
and all related methods/properties. - Removed deprecated method
trackEvent:withLabel:data
and all other variants. You should now use theBatchProfile.trackEvent
APIs. - Removed method
BatchUser.editor
and the related classBatchUserDataEditor
, you should now useBatchProfile.editor
which return an instance ofBatchProfileEditor
orBatchProfile.editWithBlock
to directly edit attributes in a closure. - Removed method
printDebugInformation
with no equivalent. - Removed methods
trackTransactionWithAmount
andtrackTransactionWithAmount:data
with no equivalents. - Removed methods
trackLocation
, you should now useBatchProfile.trackLocation
. - Added
BatchUser.clearInstallationData()
which allows you to remove the installation data without modifying the current profile.
Event
This version introduced two new types of attribute that can be attached to an event : Array and Object.
- Renamed
BatchEventData
class toBatchEventAttributes
- Removed deprecated method
Batch.trackEvent(String event, String label, JSONObject data)
. - Removed all
trackEvent
APIs from the user module. You should now useBatch.Profile.trackEvent
. - Removed
addTag
API fromBatchEventData
You should now use the$tags
reserved key withputStringArray:forKey:
method. - Removed parameter
label
fromtrackEvent
APIs. You should now use the$label
reserved key inBatchEventAttributes
with theputStringt:forKey:
method. - Added support for Array and Object attributes with the added APIs to
BatchEventAttributes
:putObject:forKey
putObjectArray:forKey
putStringArray:forKey
- Added
validateWithError
method toBatchEventAttributes
to ensure your event attributes are valid before sending them.
Messaging
- Removed method
setDelegate
, which has been replaced by thedelegate
property. - Removed method
setCanReconfigureAVAudioSession
, which has been replaced by thecanReconfigureAVAudioSession
property. - Removed method
setAutomaticMode
, which has been replaced by theautomaticMode
property.
Inbox
- Removed deprecated property
title
fromBatchInboxNotificationContent
. You should access it from themessage
property. - Removed deprecated property
body
fromBatchInboxNotificationContent
. You should access it from themessage
property. - Removed deprecated property
isDeleted
fromBatchInboxNotificationContent
.
Profile
Introduced BatchProfile
, a new module that enables interacting with profiles. Its functionality replaces most of BatchUser
used to do.
- Added
identify
API as replacement ofBatchUser.editor().setIdentifier
. - Added
editor
method to get a new instance of aBatchProfileEditor
as replacement ofBatchUserDataEditor
. - Added
editWithBlock
to directly edit profile attributes in a closure. Note: there's no need to save the editor in the closure since it done automatically. - Added
trackEventWithName
andtrackEventWithName:attributes
APIs as replacement of theBatchUser.trackEvent
methods. - Added
trackLocation
API as replacement of theBatchUser.trackLocation
method.
Fixes
- Fixed an issues where the thread sanitizer would report an issue when opening deeplinks.
1.21.2
Compiles with Xcode 15.1
Batch requires Xcode 15.1 and iOS 12.0 or higher
Core
- Re-release of 1.21.1 due to a build script issue.
1.21.1
Compiles with Xcode 15.1
Batch requires Xcode 15.1 and iOS 12.0 or higher
Core
- Batch now sets a
MinimumOSVersion
of100.0
to workaround a framework validation bug on Xcode 15.3.
1.21.0
Compiles with Xcode 15.1
Batch requires Xcode 15.1 and iOS 12.0 or higher
Core
- Improved Batch Logger for better use in Xcode 15.
- Removed support for IDFA (Advertising ID) automatic collection.
Batch.setCanUseIDFA
is now a no-op.
You need to collect it from your side and pass it to Batch via the added[BatchUserDataEditor setAttributionIdentifier:]
method. - Added Batch's Privacy Manifest. Since, as of writing, Apple does not support the XCPrivacy file for static frameworks you may not see Batch in the genertaed privacy report.
- Added code signature to the Batch's XCFramework distribution.
In-App
- In-App WebViews can now be inspected using macOS Safari on iOS 16.4 and higher.
- Fixed a crash when trying to display 0px width images in the Image format.
1.20.0
Compiles with Xcode 14.3.1
Batch requires Xcode 14.3.1 and iOS 11.0 or higher
Note: Due to Xcode 15 dropping support for iOS 11.0, this is the last minor version supporting iOS 11.
Core
- Fixed Universal Links not triggering SwiftUI's'
onOpenUrl
(iOS 14+). For iOS 13, implement your ownUISceneDelegate
using a custom application delegate or use aBatchDeeplinkDelegate
.
User
- Added method
[BatchUserDataEditor setEmail:]
. This requires to have a user identifer registered or to call thesetIdentifier
method on the editor instance beforehand. - Added
[BatchUserDataEditor setEmailMarketingSubscriptionState:]
method to subscribe to the email marketing list.
Inbox
- Added the ability to know if a
BatchPushMessage
has been displayed from the inbox via theisDisplayedFromInbox
property. - Added the ability to know if a notification has a landing message attached on
BatchInboxNotificationContent
using thehasLandingMessage()
method. - Added the ability to display a landing message attached to a
BatchInboxNotificationContent
using thedisplayLandingMessage()
method.
Messaging
- Added support for Dynamic Type allowing Batch to adapt textual content to honor the user's font size settings. This is enabled by default, you can disable it at any moment by using
[BatchMessaging setEnableDynamicType:false]
. - In-Apps Banner no longer displays when the presented view controller is an
SFSafariViewController
as it should not be hidden or obscured by other views or layers.
1.19.5
Compiles with Xcode 13.3.1
Batch requires Xcode 13.3.1 and iOS 10.0 or higher
Note: Due to Xcode 14 dropping support for Bitcode and 32-bit architectures, this is the last minor version to be bundled with these slices.
Messaging
- In-App WebView can now display inline
<video>
elements.
1.19.4
Compiles with Xcode 13.3.1
Batch requires Xcode 13.3.1 and iOS 10.0 or higher
Note: Due to Xcode 14 dropping support for Bitcode and 32-bit architectures, this is the last minor version to be bundled with these slices.
Core
- Added support for Universal Links in apps using UISceneDelegate
Messaging
- In-App WebView will now ignore WebKit error (204) when loading a video URL without HTML container