-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Summary
Define structured, JSON-serializable result types for all Apple environment and simulator management APIs. This supports the --json global option from the CLI spec.
Requirements
Every API should return a typed result that can be serialized to JSON. The output contract should include:
Standard envelope
All JSON output follows a consistent structure:
{ "type": "result", "command": "apple.check", "data": { ... } }
{ "type": "progress", "message": "Downloading iOS 18.2 runtime...", "percent": 45 }
{ "type": "error", "code": "XCODE_NOT_FOUND", "message": "..." }Model types needed
XcodeInfo— version, path, build number, bundled SDKs, isSelectedSimulatorInfo— name, UDID, state, runtime, deviceTypeRuntimeInfo— platform, version, build, identifier, size, sourceEnvironmentCheckResult— xcode, clt, runtimes, platforms, overall statusProgressReport— message, percent, stepErrorResult— code, message, details
Design Notes
- Use
System.Text.Jsonsource generators for AOT-friendly serialization - Follow the naming conventions from the CLI spec (camelCase JSON properties)
- These models are the contract between the library and the CLI — keep them stable
- Consider placing in a separate namespace (e.g.,
Xamarin.MacDev.Models) for clean separation
Reference
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels