Releases: BatchLabs/Batch-iOS-SDK
1.17.0
Compiled with Xcode 12.4
Batch requires Xcode 12 and iOS 10.0 or higher
Core
- Added the ability to enable Batch's internal logging using
[Batch setInternalLogsEnabled:true]
. They can also be enabled using the-BatchSDKEnableInternalLogs
process argument.
Internal logs should be disabled when submitting your app to the App Store. - Added nullability annotations to
BatchLoggerDelegate
. This might trigger a warning in your Swift code.
Actions
- Add a "copy to clipboard" builtin action (
batch.clipboard
). - Add a "rate app" builtin action (
batch.rating
). Requires iOS 10.3 or higher.
Messaging
- Added support for a new UI format: WebView. See documentation for more info.
- Added
batchMessageWasCancelledByError:
toBatchMessagingDelegate
, called when a message could not be loaded due to an error when loading the message's content. - Added
batchWebViewMessageDidTriggerAction:messageIdentifier:analyticsIdentifier:
toBatchMessagingDelegate
, called when a message could not be loaded due to an error when loading the message's content. - Modal formats can now be closed with the escape key
- Fix a bug where cached in-app campaigns might not be deleted when all campaigns were disabled
- In-App campaign cache is now cleared on server errors
- Fix an issue where the statusbar color would not be applied
Event Dispatchers
- Added the new event types
BatchEventDispatcherTypeMessagingCloseError
andBatchEventDispatcherTypeMessagingWebViewClick
.
Push
- Notification opens, deeplinks and mobile landings are now working when notifications aren't displayed in the foreground (
willShowSystemForegroundAlert: false
).
Inbox
[BatchInbox fetcherForUserIdentifier:authenticationKey:]
now returns a nil instance if "userIdentifier" is nil.
1.16.1
Compiled with Xcode 12.4
Batch requires Xcode 12 and iOS 10.0 or higher
This release backports changes from 1.17.1
Messaging
- Fix a bug where a user could not interact with the application under a Banner format on iPadOS 14. iPhones were unaffected.
- Fix a very rare race condition where the SDK could crash in
-[BALocalCampaignsManager isEventWatched:]
.
1.16.0
A migration guide from Batch 1.15 and lower is available here.
BREAKING:
This version drops support for iOS 8 and 9
Batch requires Xcode 12 and iOS 10.0 or higher
Batch now depends on libz. This might require a change in your project:
- Cocoapods:
The podspec has been updated to add the required linker flag. No action is needed. - Carthage/Manual integration:
When building, Xcode should automatically link your project with libz. If you get a compilation error, add-lz
to your linker flags, or addlibz
to "Frameworks and Libraries" in your app's target.
Batch and Apple Silicon
In order to support Apple Silicon, Batch will adopt the XCFramework format: it is not possible to support the iOS Simulator on Apple Silicon macs in a "fat" framework.
What it means for you:
- Cocoapods users will be migrated to the XCFramework automatically
- Carthage users will stay on the old distribution style until Carthage supports XCFrameworks.
- Manual integrations should update to XCFramework as soon as possible. Batch will be distributed in both formats for a couple of versions.
Note that the armv7s
slice is not included in the XCFramework distribution.
BatchExtension
BatchExtension isn't distributed with the SDK zip anymore. It will be released on github soon after this release.
Core
- Batch is now compatible with iOS 14's tracking consent and IDFA changes.
- Added UIScene support. If your application uses it, you must add an
UNUserNotificationCenterDelegate
, otherwise Direct Opens, Deeplinks and Mobile Landings will not work: UIScene disables legacy push application delegate methods. - eSIMs are now supported. Phones that only have an eSIM will now properly report back their carrier, if the feature hasn't been disabled.
- More nullability annotations have been added. As those annotations match Apple's own, we do not expect source compatibility to break.
- Support for TLS versions older than 1.2 has been removed.
- Added a new builtin action named
batch.ios_tracking_consent
, which requests tracking consent via AppTrackingTransparency. More info in the documentation.
Event Dispatchers
BatchEventDispatcherTypeNotificationOpen
is no longer broadcasted when the application is processing a background push.
Inbox
- Enhanced the way the SDK fetchs notifications from the servers to greatly reduce bandwidth usage. No public API change.
Push
- Add a new method
BatchPush.isBatchPush
to check if a received push comes from Batch. - Added
BatchUNUserNotificationCenterDelegate
, an UNUserNotificationCenterDelegate implementation that forwards events for Batch. CallBatchUNUserNotificationCenterDelegate.register()
to automatically set it as your delegate.
BatchUNUserNotificationCenterDelegate can display notifications when your app is in the foreground using theshowForegroundNotifications
property. - Batch will now emit a warning in the console when your app does not register an
UNUserNotificationCenterDelegate
by the timeapplication:didFinishLaunchingWithOptions:
returns. Implementing this delegate improves Batch's handling of various features that rely on notification interaction feedback, such as analytics or deeplinks: it is strongly recommended that you implement it if you don't already. - Batch now emits the
BatchPushOpenedNotification
NSNotification when a notification has been opened by the user. This deprecates BatchPushReceivedNotification: seeBatchPush.h
for more info. - In automatic mode,
application:didReceiveRemoteNotification:fetchCompletionHandler:
's completion handler is no longer called on your behalf when a deeplink is opened.
Messaging
- The "modal" format now correctly triggers actions after it has been dismissed. This will have an impact on when the custom actions are executed, making them more consistent with the Fullscreen format.
- This fixes an issue where deeplinks could not be opened in the application using SFSafariViewController with modal formats.
- The image format is now properly sized when in a freeform window (iPad in Split View, Catalyst)
- Fix a rare race condition with the interstitial format where it would fail to layout properly when the image server could not be reached.
- Modally presented messages will not be allowed to be dismissed unless they're the frontmost view controller. This fix an issue where a message with an autodismiss might dismiss a view controller presented on top of it.
- Improved dismissal logic. While automatic dismissal may fail in some rare occasions due to iOS refusing to dismiss a modal view controller when one is animating, it will not prevent the user from manually dismissing the view anymore.
User
- Added new strongly typed methods for setting attributes on BatchUserDataEditor. They greatly enhance Swift usage of the API. See
setBooleanAttribute:forKey:error
and similar methods (set(attribute: Bool, forKey: String)
in Swift).
- Those new methods return validation errors: you can now know if your attribute key/value does not pass validation and will be discarded.
- nil values are not supported in the new methods. Use
removeAttributeForKey:
explicitly.
Debug
- Clicking the "share" buttons in the debug views no longer crash on iPads.
1.15.2
Compiled with Xcode 11.5
This minor release is the last one to support iOS 8 and 9.
Event Dispatcher
- Fix an issue where event dispatchers might not be called.
User
- Fix an issue where events that had not been sent to the server would be lost when the app's process was killed.
1.15.1
1.15.0
Requires Xcode 11
This release has been built using Xcode 11.3.1.
This is the LAST release that support iOS 8 and 9. Future releases will require iOS 10+
Core
- Changed how notification status is reported: The SDK will now tell Batch's servers that notifications are enabled if :
- The app has requested and holds a provisional authorization.
- The user has disabled banners but kept lockscreen or notification center delivery enabled.
- Added support for external analytics using
BatchEventDispatcher
. See the documentation for more details.
Messaging
- New enum property
BatchMessagingContentType contentType
on classBatchInAppMessage
to help cast to the right content class. - A new optional delegate method
BatchMessagingDelegate.presentingViewControllerForBatchUI
allows to specify which view controller to display Batch messages on. - Fixed an issue where the last line of a label could be cut.
- Improved accessibility of all message formats
Inbox
- Added the
markNotificationAsDeleted:
method onBatchInboxFetcher
, allowing the deletion of notifications
1.14.2
This release has been built using Xcode 11.1.
Messaging
- Fix an issue where mobile landings might fail to be shown after opening a push for a backgrounded app on iOS 13
- Fix an issue where BatchDeeplinkDelegate does not fire in certain conditions when opening a push from the lockscreen
- Fix an issue where banners would move more than expected when swiping on them on iOS 13
1.14.1
This release officially supports iOS 13.
It has been built using and requires Xcode 11.0 GM 2.
This is the LAST release that support iOS 8 and 9. Apple has already removed their simulators form Xcode 11.
Future releases of the SDK will be distributed as a dynamic framework, as opposed to the current static framework, and will require the Swift runtime in your app.
It will be distributed in the XCFramework format for supported package managers and manual downloads.
Messaging
- Add UIScene support
- Add an analytics event for iOS 13's modal swipe-to-dismiss
1.14.0
Core
- Bug fix: deeplinks from actions are properly sent to Deeplink delegate method
User
- High level data (language/region/custom user id) can now be read back.
- User data (attributes and tags) can now be read back. Documentation
Messaging
-
Added support for two new UI formats: Modal, and Image. See the documentation for more information.
-
Added support for GIFs in Mobile Landings and In-App messages
-
Added support for rich text.
-
Added support for text scrolling in all formats. Banners will now have a maximum body height of ~160pt, and their text will scroll.
-
Deeplinks can now be open directly in the app using a SFSafariViewController for Push Notifications, Mobile Landings and In-App Mesasges
-
Added new methods on the messaging delegate allowing you to track more information such as close/autoclose and button presses. More info in the Mobile Landings documentation.
-
In swift,
BatchMessaging.setAutomaticMode
has been renamed toBatchMessaging.setAutomaticMode(on:)
Push
- BatchPushAlertDidResignNotification is sent when user dismissed the Remote notification authorization alert. Notification's userInfo dict contains user's choice in BatchPushNotificationDidAcceptKey