| 1 | /** |
| 2 | * The Expo dev client launches the app via |
| 3 | * <scheme>://expo-development-client/?url=<packager> — that URL addresses |
| 4 | * the launcher, not app navigation. Without this filter it falls through |
| 5 | * to the NotFound wildcard route on every dev launch. |
| 6 | * expo-sharing uses a private lifecycle URL only to wake the app. The |
| 7 | * persisted share inbox in App.tsx owns navigation once the payload is durable. |
| 8 | * A scheme-only URL, as sent by iOS dictation keyboards returning to the app, |
| 9 | * only wakes the app and must not reset navigation to Home. |
| 10 | */ |
| 11 | export function shouldHandleAppLink(url: string): boolean { |
| 12 | return ( |
| 13 | !url.includes("expo-development-client") && |
| 14 | !url.includes("://expo-sharing") && |
| 15 | !/^t3code(-dev|-preview)?:\/*$/.test(url) |
| 16 | ); |
| 17 | } |