Swift6 - #157
Merged
Merged
Conversation
johnno1962
force-pushed
the
swift6
branch
4 times, most recently
from
May 20, 2026 12:54
b0b1791 to
34638f4
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends InjectionNext’s MCP/ControlServer integration by adding client-side screenshot capture plus real touch event capture and replay, with corresponding server-side commands and CLI helpers.
Changes:
- Add UIKit touch capture (JSON) and replay support in the C/ObjC client, wired through new InjectionCommand/InjectionResponse cases.
- Add screenshot capture support (UIKit/AppKit) in the Swift client and a synchronous screenshot request flow in the macOS InjectionNext app.
- Expand the MCP server (tools + docs) and bundle the
mcp-serverresources into the app package.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/InjectionNextC/InjectionTouchEvents.mm | Implements UIKit touch capture to JSON and touch replay via UITouchesEvent internals. |
| Sources/InjectionNextC/include/InjectionTouchEvents.h | Declares touch capture/replay APIs for the client. |
| Sources/InjectionNextC/include/InjectionClient.h | Adds new command/response enum cases for screenshot + touch events. |
| Sources/InjectionNext/InjectionNext.swift | Serializes responses, adds screenshot capture, and handles new screenshot/touch commands. |
| README.md | Updates top-level docs to mention MCP screenshot + touch event support. |
| Package.swift | Sets swiftLanguageVersions and keeps existing CSettings propagation. |
| mcp-server/touch-events.js | Adds a CLI for fetching/replaying recorded touch events via MCP tools. |
| mcp-server/take-screenshot.js | Adds a CLI for capturing a PNG screenshot via MCP tools. |
| mcp-server/README.md | Documents new MCP tools and terminal workflows for screenshot/touch events. |
| mcp-server/package.json | Adds npm scripts for the new CLIs. |
| mcp-server/index.js | Adds MCP tools: take_screenshot, get_touch_events, replay_touch_events, and configurable timeouts. |
| App/InjectionNext/InjectionServer.swift | Adds screenshot request plumbing + touch event buffering; triggers capture on connect when MCP is enabled. |
| App/InjectionNext/Info.plist | Bumps build number. |
| App/InjectionNext/ControlServer.swift | Adds ControlServer actions to take screenshots and get/replay touch events. |
| App/InjectionNext/build_bundles.sh | Copies mcp-server into the app bundle resources. |
| App/InjectionNext.xcodeproj/project.pbxproj | Adds new source/header references and bumps marketing version to 2.0.1. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
johnno1962
force-pushed
the
swift6
branch
4 times, most recently
from
May 21, 2026 20:16
0ab8750 to
c02dfe5
Compare
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.
No description provided.