Skip to content

fix(ios): handle layout while view is detached - #1270

Merged
FabianLars merged 2 commits into
tauri-apps:devfrom
MoonVision:fix/ios_uikit_layouting_crash
Jul 21, 2026
Merged

fix(ios): handle layout while view is detached#1270
FabianLars merged 2 commits into
tauri-apps:devfrom
MoonVision:fix/ios_uikit_layouting_crash

Conversation

@ahirner

@ahirner ahirner commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Avoid querying window geometry while UIKit is laying out detached view. View will report geometry after reattachment.
fixes #1269

Avoid querying window geometry while UIKit is laying out detached view.
View will report geometry after reattachment.

fixes tauri-apps#1269
@ahirner
ahirner requested a review from a team as a code owner July 17, 2026 12:10
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through 40a565e

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.35.3 0.36.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

assert!(!window.is_null());
// UIKit can lay out a view while it is detached during window and view-controller
// transitions. There is no window ID or screen geometry to report until reattachment.
if window.is_null() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we really need some tracing or something in the ios code in the future. all these assert/assert_eq calls are giving me anxiety.

@FabianLars

Copy link
Copy Markdown
Member

Thanks :) could you also add a small changefile please? (check .changes dir)

@FabianLars
FabianLars merged commit 729bbca into tauri-apps:dev Jul 21, 2026
20 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 21, 2026
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.

[bug] iOS layoutSubviews aborts when Tao’s UIView is detached (on device rotation)

2 participants