feat: android version correctly working alongside iOS version
This commit is contained in:
@@ -49,21 +49,33 @@ pub fn desktop() {
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
#[cfg(any(target_os = "ios", target_os = "android"))]
|
||||
pub fn android() {
|
||||
let common_builder = tauri::Builder::default()
|
||||
#[cfg(target_os = "ios")]
|
||||
pub fn mobile() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_store::Builder::new().build())
|
||||
.plugin(tauri_plugin_http::init())
|
||||
.plugin(tauri_plugin_sharetarget::init());
|
||||
|
||||
#[cfg(any(target_os = "ios"))]
|
||||
common_builder.plugin(tauri_plugin_ios_shared_token::init());
|
||||
|
||||
common_builder
|
||||
.plugin(tauri_plugin_ios_shared_token::init())
|
||||
.setup(|app| {
|
||||
setup_window(app)?;
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running ios tauri application");
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn mobile() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_store::Builder::new().build())
|
||||
.plugin(tauri_plugin_http::init())
|
||||
.plugin(tauri_plugin_sharetarget::init())
|
||||
.setup(|app| {
|
||||
log::info!("running things!");
|
||||
setup_window(app)?;
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -6,5 +6,5 @@ fn main() {
|
||||
haystack_lib::desktop();
|
||||
|
||||
#[cfg(any(target_os = "ios", target_os = "android"))]
|
||||
haystack_lib::android();
|
||||
haystack_lib::mobile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user