nalexn/ViewInspector
54.6
Weak · 30 September 2026
14.5k
lines of production code
Swift
primary language
2
measurements over time
What this system is
ViewInspector is a Swift library designed for inspecting and testing SwiftUI views, modifiers, and gestures. It enables developers to verify view attributes, extract child views, and interact with components like AsyncImage and Charts within test environments. The system supports environment injection, async inspection, and comprehensive coverage across standard SwiftUI elements and platform-specific targets.
How it got here
2019 — SwiftUI inspection expansion and modernization
10 changes.
The project refactored its internal architecture to support environment injection, async inspection, and Swift 6 compatibility while significantly expanding coverage for a wide range of SwiftUI views and modifiers. This period also involved raising minimum platform requirements to iOS 15 and modernizing the testing infrastructure by removing legacy Linux runners and configuring Xcode schemes for code coverage.
2021 — watchOS support and test expansion
4 changes.
The project added a watchOS application target to enable view hosting tests on that platform. Significant effort was also directed toward expanding test coverage for SwiftUI gesture inspection, including comprehensive suites for composed gestures and hit-testing modifiers.
Features
Add inspection support for ActionSheet, AngularGradient, AsyncImage, Canvas, Chart, Color, ColorPicker, ConfirmationDialog, ContentUnavailableView, ControlGroup, and more
This update significantly expands the ViewInspector library's coverage of SwiftUI views. It introduces new inspection capabilities for a wide range of standard and new SwiftUI components, including ActionSheet, AngularGradient, AsyncImage, Canvas, Chart, Color, ColorPicker, ConfirmationDialog, ContentUnavailableView, ControlGroup, and many others. Users can now inspect attributes, extract child views, and interact with these components in their tests, such as checking Color values, accessing AsyncImage phases, or inspecting Canvas rasterization options.
Sources/ViewInspector/SwiftUI · high confidence
Add watchOS app for view hosting tests
A new watchOS application target has been added to the project to support view hosting tests. This includes the main app entry point, a testable view modifier that injects views for inspection, and the associated Xcode project configuration and assets.
.watchOS · high confidence
Added Xcode project configuration for ViewInspector
The ViewInspector Xcode project has been configured with build targets for the ViewInspector framework and its associated unit tests. This includes the necessary build phases to link against SwiftUI and XCTest frameworks, ensuring the library and its test suite can be compiled and run within the Xcode IDE.
ViewInspector.xcodeproj · high confidence
Architecture
Refactored modifier inspection into dedicated, organized files
The modifier inspection logic in Sources/ViewInspector/Modifiers has been reorganized into separate, dedicated files (such as AccessibilityModifiers, AnimationModifiers, EnvironmentModifiers, and GestureModifiers) to improve maintainability and test coverage. This structural change groups related inspection methods by category, ensuring that specific modifiers like accessibility traits, environment values, and gesture callbacks are handled in isolated modules without altering the public inspection API.
Sources/ViewInspector/Modifiers · high confidence
Behavioural changes
Added Xcode workspace configuration
The project now includes a standard Xcode workspace structure, adding the \contents.xcworkspacedata\ file to define the workspace root and the \IDEWorkspaceChecks.plist\ to suppress the 32-bit warning in Xcode. This allows developers to open the project as a workspace, which is useful for managing multiple targets or integrating with other projects.
ViewInspector.xcodeproj/project.xcworkspace · high confidence
ViewInspector: New inspection architecture with environment injection and async support
The ViewInspector library has been refactored to introduce a new internal architecture for view inspection. This change adds support for injecting \@EnvironmentObject\ and \@Environment\ values into views during inspection, allowing tests to verify behavior dependent on environment data. It also introduces first-class async inspection functions and \MainActor\ isolation for Swift 6 compatibility. Additionally, the library now supports inspecting custom views via the \CustomInspectable\ protocol and provides new APIs for extracting content from \UIViewRepresentable\ and \UIViewControllerRepresentable\ wrappers.
Sources/ViewInspector · high confidence
Test coverage
Added Xcode scheme with test coverage enabled; Added test coverage for gesture and hit-testing modifiers; Expanded SwiftUI view inspection test coverage; Expanded gesture inspection test coverage; Expanded test coverage for SwiftUI view modifiers; Expanded test coverage for ViewInspector core inspection and search capabilities; Removal of LinuxMain.swift test runner.
Dependencies
ViewInspector updates minimum platform requirements and Swift version
The ViewInspector library now requires Swift 5.9 and raises its minimum supported operating system versions to iOS 15, macOS 12, tvOS 15, watchOS 9, and visionOS 1. This change ensures compatibility with the latest Xcode toolchain and Apple platforms, while also enabling localizable string support and configuring test resources for the Swift Package Manager.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 57 → 55 (-2.1)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 97 → 95 (-2.0)
- Architecture 99 → 93 (-5.7)
- Maturity 56 → 60 (+4.6)
- Readiness 32 → 36 (+4.3)
- Security 100 → 100 (+0.0)
- Performance 64 (new)
Resolved (2)
- Documentation: no installation or build instructions (README.md)
- No assertions: testOnScrollVisibilityChangeInspection (Tests/ViewInspectorTests/ViewModifiers/EventsModifiersTests.swift)
New (86)
- Alert.supplementaryChildren (cognitive 17) (Sources/ViewInspector/SwiftUI/Alert.swift)
- Content.unwrappedModifiedContent (cognitive 16) (Sources/ViewInspector/BaseTypes.swift)
- Coverage not measured — Swift suite
- Dependency hygiene PARTLY measured — SwiftPM pinning read, dependency currency NOT established
- Duplicated block (11–12 lines × 3) (Sources/ViewInspector/SwiftUI/TabView.swift)
- Duplicated block (12 lines × 2) (Sources/ViewInspector/ContentExtraction.swift)
- Duplicated block (2–5 lines × 9) (Sources/ViewInspector/SwiftUI/ContentUnavailableView.swift)
- Duplicated block (2–6 lines × 4) (Sources/ViewInspector/SwiftUI/ActionSheet.swift)
- Duplicated block (3–5 lines × 3) (Sources/ViewInspector/BaseTypes.swift)
- Duplicated block (5 lines × 2) (Sources/ViewInspector/SwiftUI/AnyView.swift)
- Duplicated block (5 lines × 2) (Sources/ViewInspector/SwiftUI/Button.swift)
- Duplicated block (5 lines × 2) (Sources/ViewInspector/SwiftUI/GeometryReader.swift)
- Duplicated block (5 lines × 2) (Sources/ViewInspector/SwiftUI/Popover.swift)
- Duplicated block (5 lines × 3) (Sources/ViewInspector/SwiftUI/GroupBox.swift)
- Duplicated block (5 lines × 5) (Sources/ViewInspector/SwiftUI/MenuButton.swift)
- Duplicated block (6 lines × 2) (Sources/ViewInspector/SwiftUI/AsyncImage.swift)
- Duplicated block (6 lines × 2) (Sources/ViewInspector/SwiftUI/GeometryReader.swift)
- Duplicated block (7 lines × 2) (Sources/ViewInspector/InspectionEmissary.swift)
- Duplicated block (7 lines × 2) (Sources/ViewInspector/SwiftUI/Button.swift)
- Duplicated block (7 lines × 2) (Sources/ViewInspector/SwiftUI/TextAttributes.swift)
- …and 66 more
Changes since last survey
- 22 commits — 15 feature/other, 7 fixes
By area
- (repo) — 12 commits
- (root) — 4 commits
- Sources/ViewInspector — 3 commits
- Tests/ViewInspectorTests — 2 commits
- .watchOS/watchOS.xcodeproj — 1 commit
Notable commits
- fix: Fix Package.swift manifest for swift-tools-version 5.9
- fix: Merge pull request #444 from nh7a/fix-visionos-platform-version
- fix: fix Tests availability for older iOS
- fix: fix compilation for vision
- fix: fix tests for tvos
- fix: fix tests for vision
- fix: fix tests for watch os
- change: Merge branch 'accessibility-traits-empty-set-413a80' of github.com:nh7a/ViewInspector into nh7a-accessibility-traits-empty-set-413a80
- change: Merge branch 'inspect-compositing-modifiers' of github.com:nh7a/ViewInspector into nh7a-inspect-compositing-modifiers
- change: Merge branch 'inspect-submit-label' of github.com:nh7a/ViewInspector into nh7a-inspect-submit-label
- change: Merge branch 'inspect-text-case' of github.com:nh7a/ViewInspector into nh7a-inspect-text-case
- change: Merge branch 'inspect-text-selection' of github.com:nh7a/ViewInspector into nh7a-inspect-text-selection
- change: Merge branch 'nh7a-accessibility-traits-empty-set-413a80' into 0.10.4
- change: Merge branch 'nh7a-inspect-compositing-modifiers' into 0.10.4
- change: Merge branch 'nh7a-inspect-submit-label' into 0.10.4
- change: Merge branch 'nh7a-inspect-text-case' into 0.10.4
- change: Merge branch 'nh7a-inspect-text-selection' into 0.10.4
- change: Merge branch 'nh7a-readiness-sync-supported-apis' into 0.10.4
- change: bump min supported versions (forced by xcode)
- change: bump pod version
- …and 2 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
nalexn/ViewInspector was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 30 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 2dacb6e514be19379c605a5a11564d0f3fea89d9 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-cb25ca4feafa.