feat(expo): JS热更新(expo-updates) + APK大更新双轨
- app.json: expo-updates配置(checkAutomatically ON_LOAD) - ota/expo-manifest.json: JS bundle热更新manifest - App.tsx: 启动时自动检查JS+APK双轨更新 - pnpm install后npx expo prebuild生成android/原生工程
This commit is contained in:
10
ota/expo-manifest.json
Normal file
10
ota/expo-manifest.json
Normal file
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,39 +4,24 @@
|
|||||||
"slug": "yuzu-gca",
|
"slug": "yuzu-gca",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"icon": "./assets/icon.png",
|
|
||||||
"userInterfaceStyle": "dark",
|
"userInterfaceStyle": "dark",
|
||||||
"newArchEnabled": true,
|
"newArchEnabled": true,
|
||||||
"splash": {
|
"splash": { "backgroundColor": "#0f172a" },
|
||||||
"backgroundColor": "#0f172a"
|
"ios": { "supportsTablet": false, "bundleIdentifier": "dev.yuzu.gca" },
|
||||||
},
|
|
||||||
"ios": {
|
|
||||||
"supportsTablet": false,
|
|
||||||
"bundleIdentifier": "dev.yuzu.gca"
|
|
||||||
},
|
|
||||||
"android": {
|
"android": {
|
||||||
"adaptiveIcon": {
|
"adaptiveIcon": { "backgroundColor": "#0f172a" },
|
||||||
"backgroundColor": "#0f172a"
|
|
||||||
},
|
|
||||||
"package": "dev.yuzu.gca",
|
"package": "dev.yuzu.gca",
|
||||||
"allowBackup": false,
|
"allowBackup": false,
|
||||||
"permissions": [
|
"versionCode": 8,
|
||||||
"REQUEST_INSTALL_PACKAGES"
|
"permissions": ["REQUEST_INSTALL_PACKAGES"]
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": ["expo-updates"],
|
||||||
"expo-updates"
|
|
||||||
],
|
|
||||||
"updates": {
|
"updates": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"checkAutomatically": "ON_LOAD",
|
"checkAutomatically": "ON_LOAD",
|
||||||
"fallbackToCacheTimeout": 3000,
|
"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": {
|
"extra": { "eas": { "projectId": "yuzu-gca-android" } }
|
||||||
"eas": {
|
|
||||||
"projectId": "yuzu-gca-android"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user