21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.
Build, test, and automate iOS applications using accessibility-driven navigation and structured data instead of pixel coordinates.
# 1. Check environment
bash scripts/sim_health_check.sh
# 2. Launch app
python scripts/app_launcher.py --launch com.example.app
# 3. Map screen to see elements
python scripts/screen_mapper.py
# 4. Tap button
python scripts/navigator.py --find-text "Login" --tap
# 5. Enter text
python scripts/navigator.py --find-type TextField --enter-text "[email protected]"
All scripts support --help for detailed options and --json for machine-readable output.
Always prefer the accessibility tree over screenshots for navigation. The accessibility tree gives you element types, labels, frames, and tap targets — structured data that's cheaper and more reliable than image analysis.
Use this priority:
screen_mapper.py → structured element list (5-7 lines, ~10 tokens)navigator.py --find-text/--find-type/--find-id → semantic interactionScreenshots cost 1,600–6,300 tokens depending on size. The accessibility tree costs 10–50 tokens in default mode.
build_and_test.py - Build Xcode projects, run tests, parse results with progressive disclosure
--project, --scheme, --clean, --test, --verbose, --jsonlog_monitor.py - Real-time log monitoring with intelligent filtering
--app, --severity, --follow, --duration, --output, --jsonscreen_mapper.py - Analyze current screen and list interactive elements
--verbose, --hints, --jsonnavigator.py - Find and interact with elements semantically
--find-text, --find-type, --find-id, --tap, --enter-text, --jsongesture.py - Perform swipes, scrolls, pinches, and complex gestures
--swipe, --scroll, --pinch, --long-press, --refresh, --jsonkeyboard.py - Text input and hardware button control
--type, --key, --button, --slow, --clear, --dismiss, --jsonapp_launcher.py - App lifecycle management
--launch, --terminate, --install, --uninstall, --open-url, --list, --state, --jsonaccessibility_audit.py - Check WCAG compliance on current screen
--verbose, --output, --jsonvisual_diff.py - Compare two screenshots for visual changes
--threshold, --output, --details, --jsontest_recorder.py - Automatically document test execution
--test-name, --output, --verbose, --jsonapp_state_capture.py - Create comprehensive debugging snapshots
--app-bundle-id, --output, --log-lines, --jsonsim_health_check.sh - Verify environment is properly configured
clipboard.py - Manage simulator clipboard for paste testing
--copy, --test-name, --expected, --jsonstatus_bar.py - Override simulator status bar appearance
--preset, --time, --data-network, --battery-level, --clear, --jsonpush_notification.py - Send simulated push notifications
--bundle-id, --title, --body, --badge, --payload, --jsonprivacy_manager.py - Grant, revoke, and reset app permissions
--bundle-id, --grant, --revoke, --reset, --list, --jsonsimctl_boot.py - Boot simulators with optional readiness verification
--udid, --name, --wait-ready, --timeout, --all, --type, --jsonsimctl_shutdown.py - Gracefully shutdown simulators
--udid, --name, --verify, --timeout, --all, --type, --jsonsimctl_create.py - Create simulators dynamically
--device, --runtime, --name, --list-devices, --list-runtimes, --jsonsimctl_delete.py - Permanently delete simulators
--udid, --name, --yes, --all, --type, --old, --jsonsimctl_erase.py - Factory reset simulators without deletion
--udid, --name, --verify, --timeout, --all, --type, --booted, --jsonAuto-UDID Detection: Most scripts auto-detect the booted simulator if --udid is not provided.
Device Name Resolution: Use device names (e.g., "iPhone 16 Pro") instead of UDIDs - scripts resolve automatically.
Batch Operations: Many scripts support --all for all simulators or --type iPhone for device type filtering.
Output Formats: Default is concise human-readable output. Use --json for machine-readable output in CI/CD.
Help: All scripts support --help for detailed options and examples.
Screenshot Sizing: Screenshots are resized to save tokens. Presets: full (3-4 tiles, ~5K tokens), half (1 tile, ~1.6K tokens, default), quarter (1 tile, ~800 tokens, less detail). Use quarter for quick visual checks, half for readable UI, full only when pixel-level detail matters. Scripts that capture screenshots (app_state_capture.py, test_recorder.py) default to half.
bash scripts/sim_health_check.shpython scripts/app_launcher.py --launch com.example.apppython scripts/screen_mapper.pypython scripts/navigator.py --find-text "Button" --tappython scripts/accessibility_audit.pypython scripts/app_state_capture.py --app-bundle-id com.example.appSemantic Navigation: Find elements by meaning (text, type, ID) not pixel coordinates. Survives UI changes.
Token Efficiency: Concise default output (3-5 lines) with optional verbose and JSON modes for detailed results.
Accessibility-First: Built on standard accessibility APIs for reliability and compatibility.
Zero Configuration: Works immediately on any macOS with Xcode. No setup required.
Structured Data: Scripts output JSON or formatted text, not raw logs. Easy to parse and integrate.
Auto-Learning: Build system remembers your device preference. Configuration stored per-project.
Use these scripts directly or let Claude Code invoke them automatically when your request matches the skill description.