Hello! thanks for taking your time to help others.
Problem description:
While developing a SwiftUI app, for iOS 14 or later I found a bug.
You are located at one view. From this view, you can only navigate backwards, with:
@SwiftUI.Environment(\.presentationMode) private var presentationMode (defined on view properties)
And self.presentationMode.wrappedValue.dismiss() at back button action.
If you send the App to background, and open it again... it results that app has navigated backwards, without any action from the user.
What I have checked?
Breakpoints at button action: It just don't reach that point, as expected (we are not pressing the button). Checked for similar behaviour on other views, to check if it also navigates backwards while on background: Negative, just happens there As long as I know, nothing has been developed to control app workflow when App comes to background
Error message
[_Snapshotting] Snapshotting a view (0x11b00aa00, UIKeyboardImpl) that has not been rendered at least once requires afterScreenUpdates:YES._ Which I think has nothing to do.
I don't know what else I can try. Any suggestions?