Structure
SnapshotAction
Captures localized screenshots on simulators by running UI tests.
struct SnapshotActionOverview
Launches simulators for each device/locale combination and runs the screenshot UI test scheme, organizing output into a locale/device/ directory structure.
Usage
let result = try await SnapshotAction().run(
with: .init(devices: ["iPhone 16 Pro Max"], locales: ["en-US", "ja"]),
context: context
)
print("Captured \(result.screenshotCount) screenshots")Topics
Structures
struct OptionsConfiguration for screenshot capture.
struct ResultResult of a screenshot capture run.
Initializers
init()Creates a
SnapshotAction.
Instance Methods
func run(with: SnapshotAction.Options, context: ActionContext) async throws -> SnapshotAction.ResultExecute the action with the given options.
Type Properties
static let description: StringLong-form description for
--helpoutput and documentation.static let name: StringHuman-readable identifier, e.g.
"build","upload".static var validationRules: [ActionValidationRule]
Default Implementations
Relationships
Conforms To
ActionSwift.SendableSwift.SendableMetatype