From e5ce52ac4061bf162f100c80740416b4b99758eb Mon Sep 17 00:00:00 2001 From: LukeMackin Date: Sun, 19 Jul 2026 23:40:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(expo):=20JS=E7=83=AD=E6=9B=B4=E6=96=B0(exp?= =?UTF-8?q?o-updates)=20+=20APK=E5=A4=A7=E6=9B=B4=E6=96=B0=E5=8F=8C?= =?UTF-8?q?=E8=BD=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - app.json: expo-updates配置(checkAutomatically ON_LOAD) - ota/expo-manifest.json: JS bundle热更新manifest - App.tsx: 启动时自动检查JS+APK双轨更新 - pnpm install后npx expo prebuild生成android/原生工程 --- ota/expo-manifest.json | 10 ++++++++++ packages/client-android/app.json | 31 ++++++++----------------------- 2 files changed, 18 insertions(+), 23 deletions(-) create mode 100644 ota/expo-manifest.json diff --git a/ota/expo-manifest.json b/ota/expo-manifest.json new file mode 100644 index 0000000..2e352f9 --- /dev/null +++ b/ota/expo-manifest.json @@ -0,0 +1,10 @@ +{ + "version": "0.1.0", + "runtimeVersion": "0.1.0", + "assets": [], + "launchAsset": { + "key": "bundle", + "contentType": "application/javascript", + "url": "https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/releases/download/v0.1.0-dav-android-8/bundle.js" + } +} diff --git a/packages/client-android/app.json b/packages/client-android/app.json index 63e2673..9d507d4 100644 --- a/packages/client-android/app.json +++ b/packages/client-android/app.json @@ -4,39 +4,24 @@ "slug": "yuzu-gca", "version": "0.1.0", "orientation": "portrait", - "icon": "./assets/icon.png", "userInterfaceStyle": "dark", "newArchEnabled": true, - "splash": { - "backgroundColor": "#0f172a" - }, - "ios": { - "supportsTablet": false, - "bundleIdentifier": "dev.yuzu.gca" - }, + "splash": { "backgroundColor": "#0f172a" }, + "ios": { "supportsTablet": false, "bundleIdentifier": "dev.yuzu.gca" }, "android": { - "adaptiveIcon": { - "backgroundColor": "#0f172a" - }, + "adaptiveIcon": { "backgroundColor": "#0f172a" }, "package": "dev.yuzu.gca", "allowBackup": false, - "permissions": [ - "REQUEST_INSTALL_PACKAGES" - ] + "versionCode": 8, + "permissions": ["REQUEST_INSTALL_PACKAGES"] }, - "plugins": [ - "expo-updates" - ], + "plugins": ["expo-updates"], "updates": { "enabled": true, "checkAutomatically": "ON_LOAD", "fallbackToCacheTimeout": 3000, - "url": "https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/releases/download/manifest/expo-manifest.json" + "url": "https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/expo-manifest.json" }, - "extra": { - "eas": { - "projectId": "yuzu-gca-android" - } - } + "extra": { "eas": { "projectId": "yuzu-gca-android" } } } }