A SwiftUI greeting app for iOS and macOS with three locator tests and two
agent tests. One Xcode target builds both apps, and the same tests run on an
iPhone simulator and on the Mac. The test project is in e2e/, next to the
Xcode project.


Use Node 22.22.3+, 24.8+, or 26+ for the tests. From this folder:
cd e2e
npm installRun on iOS
Open HelloApp.xcodeproj in Xcode. Select the HelloApp scheme and an
iPhone simulator. Press Run to build and install the app. Stop the
Xcode run before you start the tests. From e2e/:
npx e2e doctor --target ios
npm run test:e2e:iose2e doctor checks Node, the config, agent-device, Xcode, and the
simulators. With one booted simulator or device (a connected iPhone counts),
it also checks that the app is installed.
After app changes, run the app in Xcode again before you run the tests.
Run on macOS
The app needs macOS 14 or later. From e2e/:
npm run build:macos
npx e2e doctor --target macos
npm run test:e2e:macosnpm run build:macos builds the app with xcodebuild into build/, and
npm run test:e2e:macos builds it again before the tests.
The app that starts the tests (your terminal, your IDE, or your CI agent)
needs two permissions in System Settings > Privacy & Security:
Accessibility to drive the app, and Screen Recording for screenshots.
e2e doctor checks both.
Each test launches the app and quits it when it ends. The tests run with
--headed: a SwiftUI app launched in the background doesn't always open its
window, so the app comes forward and takes the keyboard. Don't type while the
tests run.
Agent tests
Set a Vercel AI Gateway key.
From e2e/:
AI_GATEWAY_API_KEY="your-key" npm run test:e2e:iosWithout the key, the agent tests skip. Add -- --no-cache to use fresh
model calls. Results are in e2e/.e2e/report.json.
See e2e/e2e.config.ts and e2e/tests/ for the setup.
For device setup and CI, see the Mobile guide,
and for the Mac, the Desktop guide. Desktop
support is experimental: read the release notes before you upgrade
@e2e-dev/desktop.
The bundled fonts use the SIL Open Font License.
Last checked on 2026-12-01 with e2e 0.26.0, @e2e-dev/mobile 0.13.0,
@e2e-dev/desktop 0.1.0, and Xcode 27.2, on an iOS 27.2 simulator and on
macOS 26.6. npx e2e doctor, the locator tests, and the agent tests passed on
both. On macOS, the agent tests failed in about 1 of 4 runs, timing out or
unable to read the window.
