Skip to content

October 07 2026 Connect Module 2.2.2

Choose a tag to compare

@connect-sdk connect-sdk released this 06 Oct 17:08
· 36 commits to main since this release
Connect Release
Note (2.2.0): this release changes what some apps send to the collector. Review
these before upgrading:
- The name passed to `setCurrentScreen(pageName:)` now arrives as the current
  screen's `name`. Before, it arrived as the screen view's `referrer`. It names the
  screen that is appearing or on display, never the next one: naming a screen in a
  button handler before presenting it now renames the screen being left. Name each
  screen from its own `viewWillAppear`, `viewDidAppear` or `onAppear`.
- Apps that set `NumberOfWebViews` in `GlobalScreenSettings` start receiving
  screen layouts for their screens without a WebView, which raises message volume.
- View controllers declared `private`, `fileprivate`, nested, local or generic in
  Swift, and SwiftUI sheets and full-screen covers, now send screen views and
  layouts. Before, they sent none.
- Each `UNLOAD` screen view now names the screen being left, not the screen being
  entered.
- While an alert is on screen with screenshots on, the current screen is no longer
  re-posted about every 0.6 seconds. On React Native, an alert now sends an
  `UNLOAD` of the screen and an alert `LOAD`, like a native alert.
- Apps that do not ship their own `ConnectLayoutConfig.json` now capture layouts
  and screenshots 500 ms after a screen change instead of 1 ms.
- A window raised above the app's content whose root is a plain `UIViewController`
  (for example React Native's Metro loading banner in debug builds) no longer sends
  screen views or layouts.

Features:
- SwiftUI: added the `connectIdentifier(_:)` and `connectCapture(identifier:)` view modifiers, which carry an identifier into layout capture so replay can identify SwiftUI controls. SwiftUI draws its controls without a backing `UIView`, so a plain `.accessibilityIdentifier(_:)` never reached the captured layout. `connectIdentifier(_:)` also sets the view's accessibility identifier; `connectCapture(identifier:)` leaves that property to you (CA-159138).

Bug Fixes:
- Fixed `Connect.disable()` not stopping capture. Screen views, screen layouts, custom events and, once any screen appeared, gestures kept being recorded while the SDK reported itself disabled; they were held in memory and posted under the pre-disable session on the next `enable()`, so data from a stretch the app had turned capture off for — consent and privacy flows — reached the collector anyway. Nothing is recorded between `disable()` and the next `enable()` now. A kill-switch check still in flight when `disable()` was called could also restart capture on its own, and after a quick `disable()`/`enable()` its verdict landed on the new session — a "live" started the library a second time, a "die" turned it off, and its response could replace the new session's id. Verdicts of a check started before `disable()` are now dropped. Events captured before `disable()` are still delivered with the next upload once capture resumes; events the kill switch had not yet approved are discarded (CA-159045).
- Fixed each disable/enable cycle registering an additional app-became-active observer, which logged one extra client-state message per cycle every time the app returned to the foreground (CA-158101).
- Fixed screen layouts (type 10) never being captured for screens without a WebView when `NumberOfWebViews` is set in `GlobalScreenSettings`. The setting defers a screen's layout until that many WebView page loads, and it reached every screen without a rule of its own, and every screen rule that does not set the key; screens holding no WebView waited for a load that never came, while their screen views kept arriving, so replay looked broken. The deferral now applies only to screens that hold a WebView. Apps with this configuration will start receiving layouts for their other screens, which raises message volume; `CaptureLayoutOn` remains the way to turn layout capture off. A global `CaptureLayoutOn: 0` now logs one console line at startup naming the setting (CA-157703).
- Fixed an app's own `webView(_:didFinish:)` (`WKNavigationDelegate`) and `tableView(_:didSelectRowAt:)` (`UITableViewDelegate`) never being called when the delegate's class inherits the method from a superclass. Tealeaf's delegate injection put its own handler in front of the inherited method without recording that method, so only Tealeaf's handler ran; the same happened to a subclass of a delegate class that had already been injected. Both now reach the app's implementation once (CA-157703).
- Fixed the name passed to `setCurrentScreen(pageName:)` reaching the collector as the screen view's `referrer`, while its `name` stayed the view controller's class. It is now the `name` of the current screen view, with the previous screen as `referrer`, and it also names that screen's layout and its `UNLOAD`. The current screen is the one that is appearing or, when none is, the one on display. A call from `viewWillAppear` or SwiftUI's `onAppear` names the screen as it is logged; a call from `viewDidAppear` renames the screen view just logged, so one screen view is sent, under the page name. Calling it again with the same name changes nothing. It never names the next screen. React Native apps without a wrapped navigation container get the same fix (CA-159044).
- Fixed SwiftUI apps getting class names such as `_TtGC7SwiftUI19UIHostingController…` for pushed and presented screens they name with `setCurrentScreen(pageName:)` from `onAppear`; only tab switches were named. SwiftUI screens also never sent an `UNLOAD` screen view. Both now use the page name. Screens that are not named keep their class-derived name (CA-159268).
- Fixed view controllers declared `private`, `fileprivate`, nested, local or generic in Swift sending no screen view and no layout, so only their control events reached the collector. SwiftUI `.sheet` and `.fullScreenCover` content was missed for a related reason. Both are captured now. The app's own Swift classes are named by their Swift type name, for example `ReplayModalViewController`; every other screen name is unchanged (CA-159047).
- Fixed focusing a text field on iOS 26 being recorded as a screen (`UITrackingElementWindowController`). It ended the real screen early, so the next layout was filed under the wrong name (CA-159047).
- Fixed each `UNLOAD` screen view being named after the screen being entered instead of the screen being left. A view controller that never sent a `LOAD` no longer sends an `UNLOAD` (CA-159140).
- Fixed the next screen view naming a closed modal as its `referrer` when the modal's presentation kept the presenting screen visible: UIKit `.overFullScreen`, `.overCurrentContext`, `.pageSheet` and `.formSheet` (including React Native's `<Modal transparent>`), and SwiftUI `.sheet` and `.fullScreenCover`. The referrer is now the presenting screen. No screen view is sent for the return itself (CA-159243).
- Fixed `logScreenLayout…` sending an extra `LOAD` screen view, with itself as referrer, for the screen already on display. Capturing that screen again now adds a layout only. A different name, or a screen that is not on display, still sends a `LOAD` (CA-159244).
- Fixed a synchronous flush stalling the calling thread for the post timeout plus 2 seconds (302 seconds with the default configuration) when two or more queues were waiting to be posted. `logFatalErrorEvent`, `logPreconditionErrorEvent`, `logAssertionFailureErrorEvent` and `logPreconditionFailureErrorEvent` flush synchronously on the caller's thread (CA-159386).
- Fixed the current screen being re-posted about every 0.6 seconds while an alert was on screen and screenshots were on. Taking the alert's screenshot makes UIKit render through a temporary cover window whose bare view controller receives `viewDidAppear:`; the SDK logged that controller as a new screen view (a self-referencing LOAD plus a client-state message) and scheduled the next layout capture, which took the next screenshot and repeated the cycle until the alert was dismissed. Controllers that UIKit creates for rendering are no longer treated as screens. Alerts are also now recognised when they are a `UIAlertController` subclass, such as React Native's `RCTAlertController`, instead of only an exact class-name match. On React Native, the plain view controller that hosts an alert in its own window is no longer logged as a screen (it produced a self-referencing LOAD named after the screen underneath), and the alert itself now goes through the same alert handling as a native alert: an UNLOAD of the screen and an alert LOAD while it is shown (CA-159466).
- Changed the SDK's default `CaptureLayoutDelay` from 1 ms to 500 ms, matching Android and the default already used when a configuration omits the key. A near-zero delay is not faster capture on iOS: React Native testing showed it can drive repeated layout capture. Apps that do not ship their own `ConnectLayoutConfig.json` (including `ConnectConfig.Layout.basicAnalytics`) now capture layouts and screenshots 500 ms after a screen change. A delay set in the app's own configuration is unchanged (CA-158099).
- Fixed overlay windows being logged as screens. A window raised above the app's content whose root is a plain `UIViewController` holds an overlay, not a screen, but each time it appeared and disappeared the SDK logged a screen view for it and its layout. In React Native debug builds this was the Metro loading banner, shown on every refresh: on apps using a wrapped navigation container each appearance produced a VISIT or LOAD named after the screen underneath, with that screen as its referrer, followed by an UNLOAD that also cleared the real screen's pending UNLOAD. Such a controller is no longer treated as a screen; an app's own view controller subclasses, and plain controllers in windows at the normal level, are logged as before (CA-158103).

Improvements:
- None

Our environment for this release:

- Xcode 26.6
- MacOS 26.6.2
- iOS 15.1 to 26.5
- Supported architectures:
	- simulator
		- arm64
		- x86_64
	- device
		- arm64

Known Issues:

- Captures gesture even when the gestureRecognizer is set to return 'NO', this is an Apple defect.
- After iOS 13, library no longer supports iPad because of Apple changes in iPad OS.
- The pink border on Gestures screenview is off when captured using ER, because of timing or garbage collection.
- Template issue - The back link is missing during capture on some screens ProgressIndicator, AlertViewController, Gestures screenview and picker view.
- Template issue - Battery icon not visible in green anymore.
- Improvement :- 'connectionType' remains N/A if device is on WiFi on app start.
- DoPostOnScreenChange is not working as expected, because of temp queue.
- Reporting of multiple carrier names in JSON if the device has Dual SIM is a beta feature.
- React Native has an issue for dynamic builds. We will use static version instead.
- Certain Alerts may appear correctly during replay.
- If a View Controller has more than one WKWebViews, gestures may be off by a few pixels
- iPadOS Multi Window apps are not YET supported.