Skip to content

Add multi-platform support for device builds#352

Open
bitxeno wants to merge 1 commit intogetsentry:mainfrom
bitxeno:multiple_platform
Open

Add multi-platform support for device builds#352
bitxeno wants to merge 1 commit intogetsentry:mainfrom
bitxeno:multiple_platform

Conversation

@bitxeno
Copy link
Copy Markdown

@bitxeno bitxeno commented Apr 22, 2026

Why

Device builds were hard-coded to iOS, which meant watchOS, tvOS, and visionOS builds reported the wrong platform in build execution, preflight output, and the follow-up app-path lookup.

Approach

Thread the selected device platform through the existing build pipeline instead of special-casing it in separate call sites. Keep iOS as the default when no platform is provided.

How it works

The tool schema now accepts a device platform enum. The handler maps that value to the corresponding Xcode platform once, then reuses it for the build options, preflight text, pipeline metadata, and the next-step app-path lookup.

Links

  • None

projectPath: true,
workspacePath: true,
scheme: true,
platform: true,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The new platform parameter in build_device is omitted from the public schema, making it inaccessible to users in the default session-aware mode and preventing multi-platform builds.
Severity: HIGH

Suggested Fix

Remove the 'platform' key from the .omit() call on publicSchemaObject in build_device.ts. This will expose the parameter to users in the default mode. The same fix should be applied to get_device_app_path.ts.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/mcp/tools/device/build_device.ts#L52

Potential issue: The `platform` parameter, intended for multi-platform device builds, is
added to the `baseSchemaObject` but then explicitly removed from the
`publicSchemaObject` via `.omit()`. In the default session-aware mode, this public
schema is used for validation, which rejects or ignores the `platform` parameter. As a
result, `params.platform` is `undefined`, causing the build to default to iOS regardless
of user intent. This makes the new multi-platform build feature non-functional for users
in the default configuration. The same issue exists in `get_device_app_path`, breaking
the toolchain.

Also affects:

  • src/mcp/tools/device/get_device_app_path.ts:48-53

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant