Tests and debugs PWA apps using iOS Simulator on macOS...
Test and debug Progressive Web Apps using iOS Simulator on macOS for a real iOS Safari experience.
xcode-select --install# Open Simulator app
open -a Simulator
# Or boot a specific device
xcrun simctl boot "iPhone 15 Pro"
open -a Simulator
# Open localhost URL (Mac's localhost is accessible from Simulator)
xcrun simctl openurl booted "http://localhost:3000"
# Or any URL
xcrun simctl openurl booted "https://your-pwa.com"
# List all available simulators
xcrun simctl list devices
# List only booted simulators
xcrun simctl list devices | grep Booted
# Boot a simulator
xcrun simctl boot "iPhone 15 Pro"
xcrun simctl boot <DEVICE-UUID>
# Shutdown simulator
xcrun simctl shutdown booted
xcrun simctl shutdown all
# Erase simulator (factory reset)
xcrun simctl erase booted
# Delete unavailable/old simulators
xcrun simctl delete unavailable
# Open URL in booted simulator
xcrun simctl openurl booted "http://localhost:3000"
# Open URL in specific simulator
xcrun simctl openurl "iPhone 15 Pro" "https://example.com"
# Take screenshot
xcrun simctl io booted screenshot ~/Desktop/ios-screenshot.png
# Record video (Ctrl+C to stop)
xcrun simctl io booted recordVideo ~/Desktop/ios-recording.mp4
# With specific format
xcrun simctl io booted recordVideo --type=mp4 ~/Desktop/recording.mp4
# Add photos/videos to simulator
xcrun simctl addmedia booted ~/Desktop/test-image.png
xcrun simctl addmedia booted ~/Desktop/test-video.mp4
When connected via Develop menu:
PWA Service Workers appear in Safari's Develop menu:
Note: Service Worker debugging works BETTER in Simulator than on physical devices.
# Get accessibility hierarchy (requires running app)
xcrun simctl ui booted accessibility
Web.app engine (same as real device)display-mode: standalone media queriesCheck your manifest is loaded correctly:
manifest.json requestRun scripts/multi-device-test.sh to test across multiple device sizes:
./scripts/multi-device-test.sh "http://localhost:3000"
| Shortcut | Action |
|---|---|
| ⌘ + Shift + H | Go to Home Screen |
| ⌘ + Shift + H (x2) | App Switcher |
| ⌘ + → / ⌘ + ← | Rotate device |
| ⌘ + S | Take screenshot |
| ⌘ + R | Record video |
| ⌘ + K | Toggle keyboard |
http://localhost:PORT (Simulator shares Mac's network stack)http://127.0.0.1:PORT as alternativexcrun simctl erase booted