Package-level declarations

Types

Link copied to clipboard

The set of views whose content belongs to a Compose capture pipeline, so the native pipeline can stay off it.

Link copied to clipboard

Excludes a rectangular region of the window from native tap autocapture — the mechanism behind SwiftUI's .autographIgnore(). Keep it and update its rect as the content moves (scroll, layout), then unregister when the content leaves. A privacy control; only ambient autocapture is suppressed. Main thread only.

Link copied to clipboard

A live exclusion from registerAutographIgnoredView. Call unregister to release it. Holds the view until then, so the exclusion outlives the caller's other references to it if need be.

Link copied to clipboard

A running native screen capture. Created by installAutographNativeScreenCapture.

Link copied to clipboard

A running native tap capture. Created by installAutographNativeTapCapture.

Link copied to clipboard
class AutographScreenCapture(tracker: Tracker, scopeStack: ScopeStack)

Reports SwiftUI screen views that the UIKit viewDidAppear: swizzle (installAutographNativeScreenCapture) cannot see.

Link copied to clipboard

A live SwiftUI screen frame, returned by AutographScreenCapture.appeared. Its sole job is to remove that frame from the stack when the screen leaves.

Link copied to clipboard
data class AxPoint(val x: Float, val y: Float)

A point in window-space pixels — see AxRect for why that space, and why the unit is spelled out in every name here rather than left to a comment.

Link copied to clipboard
data class AxRect(val left: Float, val top: Float, val right: Float, val bottom: Float)

A rectangle in window-space pixels: relative to the hosting UIWindow's origin (not the screen's, and not any intermediate view's), and scaled by the screen's point-to-pixel ratio.

Functions

Link copied to clipboard
fun Any.accessibilityBoundsInWindowPx(view: UIView, scale: Float): AxRect?

This element's accessibilityFrame (documented by Apple as screen coordinates) converted into window-space pixels — see AxRect for that space and the two on-device bugs that motivate it.

Link copied to clipboard

This element's accessibility descendants: the union of accessibilityElements() (how the tree actually links together once inside it) and subviews (how to reach into it from an arbitrary starting UIView).

Link copied to clipboard

This element's developer-set accessibilityIdentifier, or null — including when the identifier is present but blank, which is treated as absent rather than reported as a target (see the body for why, and for why it rejects without trimming).

Link copied to clipboard
fun deepestAccessibilityHitPath(node: Any, view: UIView, positionInWindowPx: AxPoint, scale: Float, preferClickableBranches: Boolean = true): List<Any>?

Returns the path from node down to the deepest descendant whose accessibility frame contains positionInWindowPx, or null if node itself doesn't contain it.

Link copied to clipboard
fun defaultScreenName(controller: UIViewController): String?

The screen name a controller is reported under by default: its class name, verbatim.

Link copied to clipboard
fun installAutographNativeScreenCapture(tracker: Tracker, scopeStack: ScopeStack, screenName: (UIViewController) -> String? = ::defaultScreenName): AutographNativeScreenCapture

Starts reporting native UIKit screen transitions: on every UIViewController.viewDidAppear: that names a screen, a Screen Viewed event is emitted via tracker and a screen frame is pushed onto scopeStack so autocaptured taps on that screen carry it; the frame is removed on viewDidDisappear:. This is what makes #62's native taps stop carrying no screen.

Link copied to clipboard
fun installAutographNativeTapCapture(tracker: Tracker, scopeStack: ScopeStack, eventName: String = DEFAULT_AUTOCAPTURE_EVENT_NAME): AutographNativeTapCapture

Starts reporting taps on native (UIKit/SwiftUI) content as eventName, resolved through the accessibility tree by resolveNativeTapTarget.

Link copied to clipboard

Whether this element exposes UIAccessibilityTraitButton, Autograph's clickability predicate.

Link copied to clipboard
fun UIWindow.isCapturableWindow(): Boolean

Whether this window is one the capture should instrument.

Link copied to clipboard

The innermost element on this hit path that is clickable, or null if none is.

Link copied to clipboard
Link copied to clipboard

Excludes view and everything under it from native (UIKit/SwiftUI) tap autocapture — the counterpart of Compose's Modifier.autographIgnore(). This is a privacy control: a tap whose hit path crosses view is not reported at all, so a screen can keep something off the analytics stream without stripping its accessibilityIdentifier (which UI testing and assistive tooling rely on).

Link copied to clipboard
fun resolveNativeTapTarget(root: UIView, positionInWindowPx: AxPoint, scale: Float): String?

Resolves a native (UIKit/SwiftUI) tap at positionInWindowPx to the identifier Autograph reports as the event's target, or null when the tap should not be reported at all.