An open API service indexing awesome lists of open source software.

https://github.com/rightpoint/flowstacks-ios-15-bug

Demonstrating SwiftUI navigation bug in FlowStacks on iOS 15
https://github.com/rightpoint/flowstacks-ios-15-bug

Last synced: about 1 year ago
JSON representation

Demonstrating SwiftUI navigation bug in FlowStacks on iOS 15

Awesome Lists containing this project

README

          

# FlowStacks-iOS-15-Bug
Demonstrating SwiftUI navigation bug affecting [FlowStacks](https://github.com/johnpatrickmorgan/FlowStacks) on iOS 15, tracked at [issue #3](https://github.com/johnpatrickmorgan/FlowStacks/issues/3).

This was also written up as a radar and submitted to Apple (`FB9685923`).

I believe this might be related to using `replaceNFlow` twice to replace the navigation root, and seems to be made worse when `Buttons` are embedded in a `LazyVStack`. It does not affect iOS 14, only iOS 15. It usually doesn't happen on the first try, and on some launches it doesn't reproduce at all. Relaunching the app and going through the whole flow a few times seems to be necessary to reproduce.

![screenshot](Media/debug-logs.png)

Navigation fails at ~0:20 when on Screen 2 attempting to push Screen 3, and then corrupts the internal NFlow array, where it no longer reflects the user's actual location in the navigation stack.

![video](Media/video-demo.mp4?raw=true)

I'm not sure if this is related, but when launching there are some iOS-internal UIKit constraint issues:

```
2021-10-07 13:11:44.839841-0700 Example[79258:7270897] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"",
"",
"",
"",
"",
"",
""
)

Will attempt to recover by breaking constraint

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful.
2021-10-07 13:11:44.841005-0700 Example[79258:7270897] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"",
"",
"",
"",
"",
""
)

Will attempt to recover by breaking constraint

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful.
2021-10-07 13:11:44.848922-0700 Example[79258:7270897] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"",
"",
"",
"",
"",
"",
"",
""
)

Will attempt to recover by breaking constraint

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful.
```