expo.reload
Reloads the Expo app in the iOS Simulator to apply code changes during development without restarting the entire simulator.
Instructions
Reload the app in the simulator
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/server.ts:360-379 (registration)Registers the 'expo.reload' MCP tool with an inline async handler that calls reloadApp() and returns success/error response.server.tool( "expo.reload", "Reload the app in the simulator", {}, async () => { try { await reloadApp(); return { content: [ { type: "text", text: JSON.stringify({ success: true, message: "App reload triggered" }), }, ], }; } catch (error) { return handleToolError(error); } } );
- src/expo/expo.ts:231-249 (handler)Core implementation of app reload: writes 'r' to Expo process stdin to trigger Metro hot reload in the simulator.export async function reloadApp(): Promise<void> { if (!expoProcess) { throw createError("EXPO_NOT_RUNNING", "Expo is not running"); } logger.info("expo", "Reloading app..."); try { // Send 'r' key to reload (Expo CLI shortcut) expoProcess.stdin?.write("r"); // Wait a bit for reload to start await new Promise((resolve) => setTimeout(resolve, 1000)); } catch (error) { throw createError("EXPO_RELOAD_FAILED", "Failed to reload app", { details: error instanceof Error ? error.message : "Unknown error", }); } }