feat(android): always load live web URL so APK never needs rebuild for web changes
On Android, the app navigates to the live production URL immediately after setup. The APK becomes a thin shell — bundled frontend is only a placeholder for the ~1 second before redirect. All web updates (deploy web) take effect instantly on all installed APKs. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,18 @@ pub fn run() {
|
|||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
.plugin(tauri_plugin_opener::init())
|
.plugin(tauri_plugin_opener::init())
|
||||||
.plugin(tauri_plugin_deep_link::init())
|
.plugin(tauri_plugin_deep_link::init())
|
||||||
|
.setup(|app| {
|
||||||
|
// On Android, always load from the live web URL so the APK
|
||||||
|
// never needs to be rebuilt when web changes. The APK is a
|
||||||
|
// thin shell — the web app is always up to date.
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
{
|
||||||
|
if let Some(window) = app.get_webview_window("main") {
|
||||||
|
let _ = window.navigate("https://zeavisedu.asepharyana.my.id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
})
|
||||||
.run(tauri::generate_context!())
|
.run(tauri::generate_context!())
|
||||||
.expect("error while running tauri application");
|
.expect("error while running tauri application");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user