收口移动外链桥接系统调用

将 Expo app.openExternalUrl 的 Linking 调用收口到 navigation 模块

让移动 dispatch 只委托外链请求载荷

同步移动壳配置门禁和共享记忆
This commit is contained in:
2026-06-19 23:39:00 +08:00
parent 582fb20347
commit 2f37a143f1
4 changed files with 12 additions and 13 deletions
+7 -4
View File
@@ -1668,7 +1668,7 @@ if (
'const externalUrlPayload = normalizeHostBridgeExternalUrlPayload(',
) ||
!hostBridgeNavigationSource.includes(
'openMobileShellExternalNavigation(navigator, externalUrlPayload.url)',
'openMobileShellExternalNavigation(Linking, externalUrlPayload.url)',
)
) {
throw new Error(
@@ -1928,9 +1928,11 @@ for (const snippet of [
}
if (
!dispatchSource.includes('openMobileHostBridgeExternalUrl(Linking, request.payload)') ||
!dispatchSource.includes('openMobileHostBridgeExternalUrl(request.payload)') ||
!dispatchSource.includes('openMobileHostBridgeNativePage(navigation, request.payload)') ||
!dispatchSource.includes('reloadMobileHostBridgeWebView(navigation)') ||
dispatchSource.includes("from 'expo-linking'") ||
dispatchSource.includes('Linking.') ||
dispatchSource.includes('openMobileShellExternalNavigation') ||
dispatchSource.includes('resolveMobileShellWebViewUrl') ||
dispatchSource.includes('normalizeHostBridgeExternalUrlPayload') ||
@@ -1940,7 +1942,8 @@ if (
}
for (const snippet of [
'openMobileHostBridgeExternalUrl',
'openMobileShellExternalNavigation(navigator, externalUrlPayload.url)',
"import * as Linking from 'expo-linking'",
'openMobileShellExternalNavigation(Linking, externalUrlPayload.url)',
'normalizeHostBridgeExternalUrlPayload',
'openMobileHostBridgeNativePage',
'resolveMobileShellWebViewUrl',
@@ -1952,7 +1955,7 @@ for (const snippet of [
}
}
if (!hostBridgeNavigationSource.includes('openMobileShellExternalNavigation(navigator, externalUrlPayload.url)')) {
if (!hostBridgeNavigationSource.includes('openMobileShellExternalNavigation(Linking, externalUrlPayload.url)')) {
throw new Error(
'mobile shell HostBridge external URL flow must use the shared external navigation helper',
);