接入原生壳网络状态能力
新增 network.status 与 network.statusChanged HostBridge 能力 Expo 壳通过 expo-network 查询并订阅真实网络状态 Tauri 壳通过主站可达性查询和 WebView online/offline 事件同步网络状态 更新壳能力检查、测试和架构文档
This commit is contained in:
@@ -119,6 +119,8 @@ for (const snippet of [
|
||||
'configureMobileHostBridgeNavigation',
|
||||
'AppState.addEventListener',
|
||||
'app.lifecycle',
|
||||
'network.statusChanged',
|
||||
'subscribeMobileNetworkStatus',
|
||||
'navigation.canGoBack',
|
||||
'buildHostBridgeMessageScript',
|
||||
]) {
|
||||
@@ -127,7 +129,7 @@ for (const snippet of [
|
||||
}
|
||||
}
|
||||
|
||||
for (const dependency of ['expo-file-system', 'expo-sharing']) {
|
||||
for (const dependency of ['expo-file-system', 'expo-network', 'expo-sharing']) {
|
||||
if (!packageConfig.dependencies?.[dependency]) {
|
||||
throw new Error(`mobile shell package missing ${dependency}`);
|
||||
}
|
||||
@@ -136,6 +138,8 @@ for (const dependency of ['expo-file-system', 'expo-sharing']) {
|
||||
for (const snippet of [
|
||||
'file.exportText',
|
||||
'file.exportImage',
|
||||
'network.status',
|
||||
'getMobileNetworkStatus',
|
||||
'Sharing.shareAsync',
|
||||
'normalizeHostBridgeExportFileName',
|
||||
'base64Data',
|
||||
@@ -160,6 +164,8 @@ for (const capability of [
|
||||
'share.open',
|
||||
'share.setTarget',
|
||||
'app.lifecycle',
|
||||
'network.status',
|
||||
'network.statusChanged',
|
||||
'navigation.openNativePage',
|
||||
'navigation.canGoBack',
|
||||
'app.openExternalUrl',
|
||||
|
||||
Reference in New Issue
Block a user