Skip to content

Releases: BatchLabs/Batch-iOS-SDK

2.1.0

29 Oct 14:39
Compare
Choose a tag to compare

Compiles with Xcode 16.0
Batch requires Xcode 16.0 and iOS 13.0 or higher

Profile

  • Added setPhoneNumber API to the BatchProfileEditor class. This requires to have a user identifier registered or to call the identify method beforehand.
  • Added setSMSMarketingSubscriptionState API to the BatchProfileEditor class.
  • Strengthened custom user identifier validation on identify API to avoid unintended values.

2.0.2

23 May 09:16
Compare
Choose a tag to compare

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

03 May 13:53
Compare
Choose a tag to compare

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

26 Apr 16:45
Compare
Choose a tag to compare

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 to BatchSDK.
  • 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 the loggerDelegate property.
  • Removed method setAssociatedDomains, which has been replaced by the associatedDomains property.
  • Removed method isOptedOut, which has been replaced by the isOptedOut property.
  • Removed method isRunningInDevelopmentMode with no equivalent.
  • Removed method handleURL with no equivalent.
  • Removed method setUseAdvancedDeviceInformation, you should now use the added updateAutomaticDataCollectionAPI.
  • Renamed method debugViewController to makeDebugViewController.
  • 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 handleNotification.
  • Removed method handleNotification:actionIdentifier.
  • Removed method enableAutomaticDeeplinkHandling, which has been replaced by the enableAutomaticDeeplinkHandling property.
  • Removed method lastKnownPushToken, which has been replaced by the lastKnownPushToken property.
  • Added async variants of BatchPush.requestNotificationAuthorization() and requestProvisionalNotificationAuthorization(). 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.
  • Added helpers to extract Batch notification information from UNNotification instances.
    • Added method isBatchNotification
    • Added method deeplinkFromNotification
  • 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 the BatchProfile.trackEvent APIs.
  • Removed method BatchUser.editor and the related class BatchUserDataEditor, you should now use BatchProfile.editor which return an instance of BatchProfileEditor or BatchProfile.editWithBlock to directly edit attributes in a closure.
  • Removed method printDebugInformation with no equivalent.
  • Removed methods trackTransactionWithAmount and trackTransactionWithAmount:data with no equivalents.
  • Removed methods trackLocation, you should now use BatchProfile.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 to BatchEventAttributes
  • Removed deprecated method Batch.trackEvent(String event, String label, JSONObject data).
  • Removed all trackEvent APIs from the user module. You should now use Batch.Profile.trackEvent.
  • Removed addTag API from BatchEventData You should now use the $tags reserved key with putStringArray:forKey: method.
  • Removed parameter label from trackEvent APIs. You should now use the $label reserved key in BatchEventAttributes with the putStringt:forKey: method.
  • Added support for Array and Object attributes with the added APIs to BatchEventAttributes :
    • putObject:forKey
    • putObjectArray:forKey
    • putStringArray:forKey
  • Added validateWithError method to BatchEventAttributes to ensure your event attributes are valid before sending them.

Messaging

  • Removed method setDelegate, which has been replaced by the delegate property.
  • Removed method setCanReconfigureAVAudioSession, which has been replaced by the canReconfigureAVAudioSession property.
  • Removed method setAutomaticMode, which has been replaced by the automaticMode property.

Inbox

  • Removed deprecated property title from BatchInboxNotificationContent. You should access it from the message property.
  • Removed deprecated property body from BatchInboxNotificationContent. You should access it from the message property.
  • Removed deprecated property isDeleted from BatchInboxNotificationContent.

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 of BatchUser.editor().setIdentifier.
  • Added editor method to get a new instance of a BatchProfileEditor as replacement of BatchUserDataEditor.
  • 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 and trackEventWithName:attributes APIs as replacement of the BatchUser.trackEvent methods.
  • Added trackLocation API as replacement of the BatchUser.trackLocation method.

Fixes

  • Fixed an issues where the thread sanitizer would report an issue when opening deeplinks.

1.21.2

19 Mar 12:53
Compare
Choose a tag to compare

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

18 Mar 16:03
Compare
Choose a tag to compare

Compiles with Xcode 15.1
Batch requires Xcode 15.1 and iOS 12.0 or higher

Core

  • Batch now sets a MinimumOSVersion of 100.0 to workaround a framework validation bug on Xcode 15.3.

1.21.0

05 Jan 14:32
Compare
Choose a tag to compare

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

27 Jul 13:30
Compare
Choose a tag to compare

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 own UISceneDelegate using a custom application delegate or use a BatchDeeplinkDelegate.

User

  • Added method [BatchUserDataEditor setEmail:]. This requires to have a user identifer registered or to call the setIdentifier 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 the isDisplayedFromInbox property.
  • Added the ability to know if a notification has a landing message attached on BatchInboxNotificationContent using the hasLandingMessage() method.
  • Added the ability to display a landing message attached to a BatchInboxNotificationContent using the displayLandingMessage() 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

12 Apr 13:54
Compare
Choose a tag to compare

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

21 Feb 14:00
Compare
Choose a tag to compare

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