To use AccessibilitySnapshot, add it as a dependency in your Package.swift.
By default, the package uses SnapshotTesting as the engine. If you only need the core accessibility parser without the snapshotting logic, you can depend on AccessibilitySnapshotCore instead.
If you intend to use iOSSnapshotTestCase as your snapshotting engine, you must add the specific compatibility dependency: FBSnapshotTestCase+Accessibility for Swift or FBSnapshotTestCase+Accessibility-ObjC for Objective-C.
// Add to dependencies
dependencies: [
.package(name: "AccessibilitySnapshot", url: "https://github.com/cashapp/AccessibilitySnapshot.git", from: "0.4.1"),
]
// Add to test target
targets: [
.target(name: "MyApp"),
.testTarget(name: "MyAppTests", dependencies: ["MyApp", "AccessibilitySnapshot"])
]