-
Notifications
You must be signed in to change notification settings - Fork 690
feat(ios): add iOS automation support via screen mirroring #987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for midscene ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive iOS automation support to Midscene.js through screen mirroring and PyAutoGUI integration. The implementation enables users to automate iOS devices on macOS through screen mirroring with automatic coordinate transformation.
- Adds new
@midscene/ios
package with complete iOS automation SDK - Implements PyAutoGUI server for macOS system control and iOS device interaction
- Extends YAML script support to include iOS configuration alongside existing web and Android options
Reviewed Changes
Copilot reviewed 37 out of 40 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
packages/web-integration/tests/unit-test/yaml/utils.test.ts |
Adds comprehensive tests for iOS configuration parsing |
packages/web-integration/src/yaml/utils.ts |
Updates YAML parser to support iOS configuration alongside web/Android |
packages/web-integration/src/common/tasks.ts |
Extends Android page detection to include iOS for unified mobile handling |
packages/ios/src/page/index.ts |
Core iOS device implementation with coordinate mapping and PyAutoGUI integration |
packages/ios/src/agent/index.ts |
iOS agent wrapper providing high-level automation interface |
packages/ios/idb/auto_server.py |
Python server implementing PyAutoGUI automation with iOS-specific optimizations |
packages/cli/src/create-yaml-player.ts |
Extends CLI to support iOS device creation and configuration |
packages/core/src/yaml.ts |
Adds iOS environment types to core YAML schema |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/web-integration/src/common/tasks.ts:75
- The function name
isAndroidPage
is misleading since it now also returns true for iOS pages. Consider renaming toisMobilePage
orisAndroidOrIOSPage
to better reflect its current behavior.
return page.pageType === 'android' || page.pageType === 'ios';
The test file 'packages/ios/tests/ios-input-test.ts' is no longer needed and has been removed.
Add iOS Automation Support via Screen Mirroring
This PR introduces comprehensive iOS automation capabilities to Midscene through screen mirroring and PyAutoGUI integration.
Demo
ios-2025-08-04_23-03-44-4xv2jvtw.html.zip
🚀 Key Features
📦 What's Added
@midscene/ios
package with complete iOS automation SDKiOSDevice
andiOSAgent
classes for device control and AI interactionsauto_server.py
) for system-level operations🛠 Usage Example
This implementation enables seamless iOS automation while maintaining Midscene's core AI-driven approach and developer-friendly experience.