Add multi-platform support for device builds#352
Open
bitxeno wants to merge 1 commit intogetsentry:mainfrom
Open
Add multi-platform support for device builds#352bitxeno wants to merge 1 commit intogetsentry:mainfrom
bitxeno wants to merge 1 commit intogetsentry:mainfrom
Conversation
| projectPath: true, | ||
| workspacePath: true, | ||
| scheme: true, | ||
| platform: true, |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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