Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
57f9d56
feat(android): prepare for multi-window support
lucasfernog Oct 22, 2025
a71c707
add android multiwindow apis
lucasfernog Oct 23, 2025
f12df40
activity_name getter, JS API, auto inherit from manager on builder::new
lucasfernog Oct 24, 2025
c389ba4
refactor(core): improve iOS log messages from stdout/stderr
lucasfernog Oct 28, 2025
9e0bbff
patch
lucasfernog Oct 28, 2025
067ef61
Merge branch 'dev' into feat/mobile-multi-window
lucasfernog Oct 28, 2025
6854f8b
Merge branch 'refactor/ios-stdout-stderr-log' into feat/mobile-multi-…
lucasfernog Oct 28, 2025
b5d874d
use context (created_by_activity_name) from caller on TS API
lucasfernog Oct 29, 2025
bcc25c0
add scene identifier getter and setter
lucasfernog Oct 29, 2025
e4ccc32
expose apis
lucasfernog Oct 29, 2025
9a360af
fix desktop build
lucasfernog Oct 29, 2025
c5dbb02
Merge remote-tracking branch 'origin/dev' into feat/mobile-multi-window
lucasfernog Oct 30, 2025
6b94116
fix window from config
lucasfernog Oct 30, 2025
a602008
update lock
lucasfernog Oct 30, 2025
eb51b13
size is now respected on iOS, so default to None
lucasfernog Oct 30, 2025
f5f9b3d
add SceneRequested event
lucasfernog Nov 6, 2025
220cc2a
Merge remote-tracking branch 'origin/dev' into feat/mobile-multi-window
lucasfernog Nov 12, 2025
6eb2dee
update features
lucasfernog Nov 12, 2025
bfc74a7
fix default size
lucasfernog Nov 12, 2025
e97e2e5
Revert "fix default size"
lucasfernog Nov 12, 2025
11fc78b
ignore size from config
lucasfernog Nov 12, 2025
e5f65a6
lint
lucasfernog Nov 12, 2025
1702b27
Merge remote-tracking branch 'origin/dev' into feat/mobile-multi-window
lucasfernog Nov 17, 2025
2172252
use git
lucasfernog Nov 17, 2025
7f953fc
change file
lucasfernog Nov 17, 2025
7f02cf5
add supports_multiple_windows API
lucasfernog Dec 2, 2025
12aaef6
add androidx.lifecycle:lifecycle-process
lucasfernog Dec 3, 2025
00dcedc
update wry
lucasfernog Dec 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add SceneRequested event
  • Loading branch information
lucasfernog committed Nov 6, 2025
commit f5f9b3dfab993a98b03c1c369d2c68c8f132a8d7
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/tauri-runtime-wry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4283,6 +4283,10 @@ fn handle_event_loop<T: UserEvent>(
} => callback(RunEvent::Reopen {
has_visible_windows,
}),
#[cfg(target_os = "ios")]
Event::SceneRequested { scene, options } => {
callback(RunEvent::SceneRequested { scene, options });
}
_ => (),
}
}
Expand Down
14 changes: 14 additions & 0 deletions crates/tauri-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,20 @@ pub enum RunEvent<T: UserEvent> {
},
/// A custom event defined by the user.
UserEvent(T),
/// Emitted when a scene is requested by the system.
///
/// This event is emitted when a scene is requested by the system.
/// Scenes created by [`Window::new`] are not emitted with this event.
/// It is also not emitted for the main scene.
#[cfg(target_os = "ios")]
SceneRequested {
/// Scene that was requested by the system.
scene: objc2::rc::Retained<objc2_ui_kit::UIScene>,
/// Options that were used to request the scene.
///
/// This lets you determine why the scene was requested.
options: objc2::rc::Retained<objc2_ui_kit::UISceneConnectionOptions>,
},
}

/// Action to take when the event loop is about to exit
Expand Down
18 changes: 18 additions & 0 deletions crates/tauri/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,20 @@ pub enum RunEvent {
/// Indicates whether the NSApplication object found any visible windows in your application.
has_visible_windows: bool,
},
/// Emitted when a scene is requested by the system.
///
/// This event is emitted when a scene is requested by the system.
/// Scenes created by [`Window::new`] are not emitted with this event.
/// It is also not emitted for the main scene.
#[cfg(target_os = "ios")]
SceneRequested {
/// Scene that was requested by the system.
scene: objc2::rc::Retained<objc2_ui_kit::UIScene>,
/// Options that were used to request the scene.
///
/// This lets you determine why the scene was requested.
options: objc2::rc::Retained<objc2_ui_kit::UISceneConnectionOptions>,
},
}

impl From<EventLoopMessage> for RunEvent {
Expand Down Expand Up @@ -2505,6 +2519,10 @@ fn on_event_loop_event<R: Runtime>(
} => RunEvent::Reopen {
has_visible_windows,
},
#[cfg(target_os = "ios")]
RuntimeRunEvent::SceneRequested { scene, options } => {
RunEvent::SceneRequested { scene, options }
}
_ => unimplemented!(),
};

Expand Down
19 changes: 17 additions & 2 deletions examples/api/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub fn run_app<R: Runtime, F: FnOnce(&App<R>) + Send + 'static>(

let number = created_window_count.fetch_add(1, std::sync::atomic::Ordering::Relaxed);

let builder = tauri::WebviewWindowBuilder::new(
let builder = WebviewWindowBuilder::new(
&app_,
format!("new-{number}"),
tauri::WebviewUrl::External("about:blank".parse().unwrap()),
Expand Down Expand Up @@ -181,9 +181,12 @@ pub fn run_app<R: Runtime, F: FnOnce(&App<R>) + Send + 'static>(
#[cfg(target_os = "macos")]
app.set_activation_policy(tauri::ActivationPolicy::Regular);

#[cfg(target_os = "ios")]
let mut counter = 0;
app.run(move |_app_handle, _event| {
#[cfg(all(desktop, not(test)))]
#[cfg(not(test))]
match &_event {
#[cfg(desktop)]
RunEvent::ExitRequested { api, code, .. } => {
// Keep the event loop running even if all windows are closed
// This allow us to catch tray icon events when there is no window
Expand All @@ -192,6 +195,7 @@ pub fn run_app<R: Runtime, F: FnOnce(&App<R>) + Send + 'static>(
api.prevent_exit();
}
}
#[cfg(desktop)]
RunEvent::WindowEvent {
event: tauri::WindowEvent::CloseRequested { api, .. },
label,
Expand All @@ -207,6 +211,17 @@ pub fn run_app<R: Runtime, F: FnOnce(&App<R>) + Send + 'static>(
.destroy()
.unwrap();
}
#[cfg(target_os = "ios")]
RunEvent::SceneRequested { .. } => {
counter += 1;
WebviewWindowBuilder::new(
_app_handle,
format!("main-from-scene-{counter}"),
WebviewUrl::default(),
)
.build()
.unwrap();
}
_ => (),
}
})
Expand Down
Loading