Skip to content

Conversation

@lucasfernog
Copy link
Member

Leverages scenes on iOS and Activity embedding on Android.

iOS

  • Added Event::SceneRequested (on iPad the user can request a new window to be open - e.g. by long pressing the app icon and selecting "New window")
  • Request new scene to be created on Window::new (if needed, main scene is detected automatically) and assign the window instance later when it gets connected

Android

  • Create new activity on Window::new (if needed, main activity is detected automatically)
  • Added builder methods to determine the activity to be created
  • System determines what to do with the activity (new stack, next to another one.. based on the embedding rules)

@lucasfernog lucasfernog requested a review from a team as a code owner November 17, 2025 11:39
@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

Package Changes Through fb52c34

There are 1 changes which include tao with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tao 0.34.5 0.35.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@lucasfernog
Copy link
Member Author

needs tauri-apps/wry#1633

// when we support multiple scenes, request the activation of this window's scene
if application.supportsMultipleScenes() {
// alternative function is iOS 17+
#[allow(deprecated)]
Copy link

@velocitysystems velocitysystems Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this API is deprecated and will be removed in the future we should use activateSceneSession(for:errorHandler:).

Can we use conditional logic based on availability? e.g.

if #available(iOS 17, *) {
   // Use supported API
} else {
   #[allow(deprecated)]
   // Fallback to deprecated API
}

Also - no error handler is set which means scene activation failures will be invisible.
Should we add logging and an optional fallback path?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// alternative function is iOS 17+
#[allow(deprecated)]
application.requestSceneSessionActivation_userActivity_options_errorHandler(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using deprecated API, no error handler is set. See this comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// instead of returning an Option here, we default to an empty string
// scene lifecycle will be enforced anyway soon (iOS 27)
pub fn scene_identifier(&self) -> String {
Copy link

@velocitysystems velocitysystems Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple windows without scenes get the same "" identifier.
Should we instead return Option<String> and handle downstream?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're not using scenes, doesn't make much sense to use this getter
returning an Option here is inconvenient - scenes will be enforced next year, and Apple is already giving warnings

@@ -143,155 +185,125 @@ impl<T: 'static> EventLoop<T> {
}
Event::Stop => self.running = false,
Event::Start => self.running = true,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handlers for Event::Start and EventSource::InputQueue have been commented out. Is additional work required?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those variants simply weren't being used

@socket-security
Copy link

socket-security bot commented Dec 2, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedobjc2-ui-kit@​0.3.010010093100100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants