argent-react-native-app-workflow
Physical iPhone (kind: "device"): Metro debugging and profiling tools reject it. Use a simulator.
react-native-macos app: start Metro (§1.2), then follow argent-macos-app-interact instead of run-macos.
1. Starting the React Native App
1.1 Read the project's configuration first
Before running commands, read the project's build and run setup: every package.json script (custom scripts such as start:local, start:dev, ios, build:ios or flavors take priority over the defaults) and metro.config.js (a non-default port or watchFolders). Do NOT default to npx react-native … or npx expo … without checking. Before the first build, install dependencies if node_modules or ios/Pods is missing.
If the project structure is convoluted, ask the user before proceeding.
Once you know how the project starts Metro, builds and runs the app, and what environment setup it needs, save that to project memory so you don't need to rediscover it each time.
1.2 Start Metro
- If Metro is already running on the project's port, do not start another (§2).
- Start it in the background with the project's start script (e.g.
npm run start:local,yarn start:dev). With none:npx expo startin an Expo project,npx react-native startotherwise. - Verify with
debugger-status:status: "connected"orreason: "no_app_connected"both mean Metro is up (the app just hasn't attached yet);reason: "metro_not_running"means Metro is not reachable.