Skip to content

Add simulator management APIs (maui apple simulator) #149

@rmarinho

Description

@rmarinho

Summary

Add library APIs for iOS/tvOS/watchOS/visionOS simulator management, supporting the maui apple simulator commands from the CLI spec.

Commands to Support

Command Description
maui apple simulator list List available simulators (name, UDID, state, runtime, device type)
maui apple simulator create Create a new simulator with specified device type and runtime
maui apple simulator start Boot and open a simulator by name or UDID
maui apple simulator delete Delete a simulator
maui apple simulator reset Erase all content and settings from a simulator

Requirements

simulator list

  • Wraps xcrun simctl list devices --json
  • Return structured data: name, UDID, state (Shutdown/Booted), runtime version, device type
  • Support filtering by runtime platform (iOS, tvOS, etc.)

simulator create

  • Wraps xcrun simctl create <name> <device-type> <runtime>
  • Validate device type and runtime exist before creating
  • Return the UDID of the created simulator

simulator start

  • Wraps xcrun simctl boot <udid> + open -a Simulator
  • Support lookup by name (resolve to UDID)
  • Handle already-booted state gracefully

simulator delete

  • Wraps xcrun simctl delete <udid>
  • Shut down first if booted
  • Support --all-unavailable to clean up unavailable simulators

simulator reset

  • Wraps xcrun simctl erase <udid>
  • Shut down first if booted

Design Notes

  • All APIs should be async and support cancellation
  • Delegate to xcrun simctl — do not reimplement simulator internals
  • Results should be JSON-serializable for --json output
  • Consider using AppleDev.Tools as reference

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions