From apple-docs
Automate simulator UI interactions - tap, swipe, type, and verify screen content.
npx claudepluginhub briannadoubt/claude-marketplace --plugin apple-docsThis skill uses the workspace's default tool permissions.
Automate simulator UI interactions - tap, swipe, type, and verify screen content.
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
Automate simulator UI interactions - tap, swipe, type, and verify screen content.
Important: This skill requires the AppleDocsTool MCP server for UI automation, as it uses macOS Accessibility APIs that can't be accessed via shell commands alone.
For basic interactions, you can use xcrun simctl directly. For visual state inspection and coordinate-based interactions, you'll need the MCP tools.
# Type text (requires app with focused text field)
# Note: This sends keystrokes to the Simulator app
osascript -e 'tell application "Simulator" to activate'
osascript -e 'tell application "System Events" to keystroke "Hello World"'
# Press Return
osascript -e 'tell application "System Events" to key code 36'
# Press Escape
osascript -e 'tell application "System Events" to key code 53'
# Home button
xcrun simctl ui booted home
# Lock device (if supported)
# Note: Not all button types available via simctl
# Navigate via deep link
xcrun simctl openurl booted "myapp://screen/settings"
xcrun simctl openurl booted "https://example.com/login"
# Take screenshot
xcrun simctl io booted screenshot /tmp/screen.png
# View it (opens Preview)
open /tmp/screen.png
For OCR and coordinate extraction, use the MCP tool simulator_ui_state which returns:
The MCP tools provide coordinate-based interaction:
Get UI State (simulator_ui_state)
Find Text (simulator_find_text)
Interact (simulator_interact)
1. Call simulator_ui_state to see the screen
2. Find the "Login" button coordinates from the response
3. Call simulator_interact with action="tap" at those coordinates
4. Call simulator_ui_state again to verify the result
For basic automation without MCP:
# Click at coordinates (screen coordinates, not simulator)
osascript -e 'tell application "System Events" to click at {500, 400}'
# More reliable: Use Accessibility
osascript << 'EOF'
tell application "Simulator" to activate
delay 0.5
tell application "System Events"
tell process "Simulator"
-- Click in the simulator window
click at {500, 400}
end tell
end tell
EOF
# 1. Launch app fresh
xcrun simctl terminate booted com.example.myapp
xcrun simctl launch booted com.example.myapp
# 2. Wait for launch
sleep 2
# 3. Take screenshot to see initial state
xcrun simctl io booted screenshot /tmp/step1.png
# 4. Use MCP simulator_interact to tap login button
# 5. Use MCP simulator_interact to type credentials
# 6. Screenshot final state
xcrun simctl io booted screenshot /tmp/step2.png
# Navigate through screens capturing each
for screen in home settings profile; do
xcrun simctl openurl booted "myapp://$screen"
sleep 1
xcrun simctl io booted screenshot "/tmp/$screen.png"
done
xcrun simctl privacy booted resetsimulator_ui_state - Get screenshot + OCR text with coordinatessimulator_find_text - Find specific text and get tap coordinatessimulator_interact - Tap, swipe, type, press buttonsThese tools use macOS Accessibility APIs to interact with the simulator window directly, providing reliable coordinate-based automation.