Releases: BatchLabs/Batch-iOS-SDK
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
Batchclass 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
setUseIDFAwhich was a no-op. - Removed method
setLoggerDelegate, which has been replaced by theloggerDelegateproperty. - Removed method
setAssociatedDomains, which has been replaced by theassociatedDomainsproperty. - Removed method
isOptedOut, which has been replaced by theisOptedOutproperty. - Removed method
isRunningInDevelopmentModewith no equivalent. - Removed method
handleURLwith no equivalent. - Removed method
setUseAdvancedDeviceInformation, you should now use the addedupdateAutomaticDataCollectionAPI. - Renamed method
debugViewControllertomakeDebugViewController. - 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 theenableAutomaticDeeplinkHandlingproperty. - Removed method
lastKnownPushToken, which has been replaced by thelastKnownPushTokenproperty. - 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
UINotificationrelated 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
BatchUNUserNotificationCenterDelegatenow 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
BatchUserProfileand all related methods/properties. - Removed deprecated method
trackEvent:withLabel:dataand all other variants. You should now use theBatchProfile.trackEventAPIs. - Removed method
BatchUser.editorand the related classBatchUserDataEditor, you should now useBatchProfile.editorwhich return an instance ofBatchProfileEditororBatchProfile.editWithBlockto directly edit attributes in a closure. - Removed method
printDebugInformationwith no equivalent. - Removed methods
trackTransactionWithAmountandtrackTransactionWithAmount:datawith 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
BatchEventDataclass toBatchEventAttributes - Removed deprecated method
Batch.trackEvent(String event, String label, JSONObject data). - Removed all
trackEventAPIs from the user module. You should now useBatch.Profile.trackEvent. - Removed
addTagAPI fromBatchEventDataYou should now use the$tagsreserved key withputStringArray:forKey:method. - Removed parameter
labelfromtrackEventAPIs. You should now use the$labelreserved key inBatchEventAttributeswith theputStringt:forKey:method. - Added support for Array and Object attributes with the added APIs to
BatchEventAttributes:putObject:forKeyputObjectArray:forKeyputStringArray:forKey
- Added
validateWithErrormethod toBatchEventAttributesto ensure your event attributes are valid before sending them.
Messaging
- Removed method
setDelegate, which has been replaced by thedelegateproperty. - Removed method
setCanReconfigureAVAudioSession, which has been replaced by thecanReconfigureAVAudioSessionproperty. - Removed method
setAutomaticMode, which has been replaced by theautomaticModeproperty.
Inbox
- Removed deprecated property
titlefromBatchInboxNotificationContent. You should access it from themessageproperty. - Removed deprecated property
bodyfromBatchInboxNotificationContent. You should access it from themessageproperty. - Removed deprecated property
isDeletedfromBatchInboxNotificationContent.
Profile
Introduced BatchProfile, a new module that enables interacting with profiles. Its functionality replaces most of BatchUser used to do.
- Added
identifyAPI as replacement ofBatchUser.editor().setIdentifier. - Added
editormethod to get a new instance of aBatchProfileEditoras replacement ofBatchUserDataEditor. - Added
editWithBlockto directly edit profile attributes in a closure. Note: there's no need to save the editor in the closure since it done automatically. - Added
trackEventWithNameandtrackEventWithName:attributesAPIs as replacement of theBatchUser.trackEventmethods. - Added
trackLocationAPI as replacement of theBatchUser.trackLocationmethod.
Fixes
- Fixed an issues where the thread sanitizer would report an issue when opening deeplinks.
1.21.1
Compiles with Xcode 15.1
Batch requires Xcode 15.1 and iOS 12.0 or higher
Core
- Batch now sets a
MinimumOSVersionof100.0to 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.setCanUseIDFAis 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 ownUISceneDelegateusing a custom application delegate or use aBatchDeeplinkDelegate.
User
- Added method
[BatchUserDataEditor setEmail:]. This requires to have a user identifer registered or to call thesetIdentifiermethod on the editor instance beforehand. - Added
[BatchUserDataEditor setEmailMarketingSubscriptionState:]method to subscribe to the email marketing list.
Inbox
- Added the ability to know if a
BatchPushMessagehas been displayed from the inbox via theisDisplayedFromInboxproperty. - Added the ability to know if a notification has a landing message attached on
BatchInboxNotificationContentusing thehasLandingMessage()method. - Added the ability to display a landing message attached to a
BatchInboxNotificationContentusing 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
SFSafariViewControlleras 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
1.19.3
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
- Fixed a SQLite crash caused by a race condition: triggering an In-app message with "Re-evaluate campaign eligibility" enabled right after calling
[BatchUserDataEditor save]could make concurrent accesses to SQLite and crash.
Messaging
- Fixed a rare crash that could happen when re-evaluating multiple campaigns eligibility for a same trigger.
1.19.2
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
- Fixed implementations of various internal objects implementing NSCopying, which could crash in some rare cases on pre iOS 13 devices.
- Fixed an issue the SDK would not send a notification permission status change to Batch's servers until a later SDK start.