Skip to content

Reference

cdp_connect

Connect only the exact app target on the authority-bound Metro and commit its signed initial-bundle handshake. Omitted port/platform/app values come from the session; conflicts refuse.

NameTypeRequiredDefaultConstraintsDescription
metroPortnumberNoMust equal the authority-bound Metro port; omitted uses that exact port
platformstringNoFilter target by platform (e.g. “ios”, “android”). If already connected to a different platform, forces reconnection to the correct target.
targetIdstringNoAdvisory; refuses only if it conflicts with the bound target
bundleIdstringNoApp bundle id to match against target.description (e.g. “com.myapp.dev”). Filters out zombie Expo Go host pages when the real app target is present. B111/D635.
forcebooleanNofalseForce disconnect and reconnect even if already connected. Use to switch targets or recover from stale connections.
cdp_connect()