Scans UIKit, SwiftUI, storyboard, and XIB code for missing accessibilityIdentifier values. Generates deterministic names, previews exact changes, and applies them strictly after a single Y/n confirmation.
dependencies: [
.package(url: "https://github.com/PeachlifeAB/swifta11y.git", from: "0.1.0")
]Add the IOSA11yInjectorCore product to your target.
mint install PeachlifeAB/swifta11y@0.1.0Run from the root of your iOS project:
swifta11y . # Scan, preview, and prompt Y/n
swifta11y . --preview # Print change set without applying
swifta11y . --apply # Force apply changes(Optional) Create a .swifta11y YAML file in your root to restrict scope:
scan: [uikit, swiftui, xml]This tool relies entirely on a deterministic, base-type-driven detection model (UIView / View). It does not use heuristics, file paths, or partial approvals.
- Standard format:
EnclosingType.propertyName(for example,LoginViewController.emailTextField) - Collections:
EnclosingType.collectionName.viewName(for example,FeedView.items.titleLabel) - Strict skip rule: If an element lacks a stable, exact source-level name, it is skipped and excluded from auto-injection.
- Fast local tests:
swift test --filter ProjectScanCountTests - Slow fixture scans:
SWIFTA11Y_RUN_SLOW_FIXTURE_SCANS=1 swift test