This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Presenting alert immediately after fullscreen cover results in UIKit error #1277
Closed
2 tasks done
Labels
apple bug
Something isn't working due to a bug on Apple's platforms.
Description
Not sure if this is a TCA bug, or something on the application side. However, I am still posting it because I couldn’t find any guidance about this case.
In a nutshell: when there is a fullscreen cover, and alert shown immediately after dismissing the fullscreen cover, TCA changes the state such that SwiftUI attempts to present the alert before fullscreen cover is fully dismissed. This results in a UIKit error, and the alert not being shown.
Checklist
mainbranch of this package.Expected behavior
Instead of alert, I get the following UIKit error in console.
2022-06-23 14:33:21.928104+0300 SwiftUICaseStudies[4936:1813721] [Presentation] Attempt to present <SwiftUI.PlatformAlertController: 0x7f801d916a00> on <_TtGC7SwiftUI19UIHostingControllerGVS_15ModifiedContentVS_7AnyViewVS_12RootModifier__: 0x7f801e006ab0> (from <_TtGC7SwiftUI19UIHostingControllerGVS_15ModifiedContentVS_7AnyViewVS_24NavigationColumnModifier__: 0x7f802e909160>) which is already presenting <_TtGC7SwiftUI29PresentationHostingControllerVS_7AnyView_: 0x7f802d733ef0>.Actual behavior
The fullscreen cover dismissal and alert showing should be sequenced in the correct fashion and happen one after another without me having to put in delays or otherwise hack the system.
Steps to reproduce
Example project to reproduce the correct/incorrect behavior:
Video example of desired behavior:
Simulator.Screen.Recording.-.iPhone.13.Pro.-.2022-08-19.15.16.19.mp4
The Composable Architecture version information
cfcf8b4 (June 20 2022)
Destination operating system
iOS 15.5
Xcode version information
13.4 (13F17a)
Swift Compiler version information
The text was updated successfully, but these errors were encountered: