{"id":18389354,"url":"https://github.com/rightpoint/flowstacks-ios-15-bug","last_synced_at":"2025-04-12T06:29:08.212Z","repository":{"id":143418206,"uuid":"414736127","full_name":"Rightpoint/FlowStacks-iOS-15-Bug","owner":"Rightpoint","description":"Demonstrating SwiftUI navigation bug in FlowStacks on iOS 15","archived":false,"fork":false,"pushed_at":"2021-10-07T20:38:31.000Z","size":5864,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-16T00:48:41.225Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rightpoint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-07T19:43:58.000Z","updated_at":"2022-01-18T13:06:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"765bfd0f-fb8a-49a5-b082-69f00fda14c1","html_url":"https://github.com/Rightpoint/FlowStacks-iOS-15-Bug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FFlowStacks-iOS-15-Bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FFlowStacks-iOS-15-Bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FFlowStacks-iOS-15-Bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FFlowStacks-iOS-15-Bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rightpoint","download_url":"https://codeload.github.com/Rightpoint/FlowStacks-iOS-15-Bug/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248528128,"owners_count":21119231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T01:42:45.797Z","updated_at":"2025-04-12T06:29:08.181Z","avatar_url":"https://github.com/Rightpoint.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlowStacks-iOS-15-Bug\nDemonstrating SwiftUI navigation bug affecting [FlowStacks](https://github.com/johnpatrickmorgan/FlowStacks) on iOS 15, tracked at [issue #3](https://github.com/johnpatrickmorgan/FlowStacks/issues/3).\n\nThis was also written up as a radar and submitted to Apple (`FB9685923`).\n\nI 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.\n\n![screenshot](Media/debug-logs.png)\n\nNavigation 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.\n\n![video](Media/video-demo.mp4?raw=true)\n\nI'm not sure if this is related, but when launching there are some iOS-internal UIKit constraint issues:\n\n```\n2021-10-07 13:11:44.839841-0700 Example[79258:7270897] [LayoutConstraints] Unable to simultaneously satisfy constraints.\n\tProbably at least one of the constraints in the following list is one you don't want. \n\tTry this: \n\t\t(1) look at each constraint and try to figure out which you don't expect; \n\t\t(2) find the code that added the unwanted constraint or constraints and fix it. \n(\n    \"\u003cNSLayoutConstraint:0x6000024c6300 'BIB_Trailing_CB_Leading' H:[_UIModernBarButton:0x7fa914f2bbc0]-(6)-[_UIModernBarButton:0x7fa914f29320'Screen 1']   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c6350 'CB_Trailing_Trailing' _UIModernBarButton:0x7fa914f29320'Screen 1'.trailing \u003c= _UIButtonBarButton:0x7fa914f28600.trailing   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c7020 'UINav_static_button_horiz_position' _UIModernBarButton:0x7fa914f2bbc0.leading == UILayoutGuide:0x600003e77020'UIViewLayoutMarginsGuide'.leading   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c7070 'UINavItemContentGuide-leading' H:[_UIButtonBarButton:0x7fa914f28600]-(6)-[UILayoutGuide:0x600003e76f40'UINavigationBarItemContentLayoutGuide']   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c4230 'UINavItemContentGuide-trailing' UILayoutGuide:0x600003e76f40'UINavigationBarItemContentLayoutGuide'.trailing == _UINavigationBarContentView:0x7fa914f26830.trailing   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024bb700 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7fa914f26830.width == 0   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c45f0 'UIView-leftMargin-guide-constraint' H:|-(8)-[UILayoutGuide:0x600003e77020'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UINavigationBarContentView:0x7fa914f26830 )\u003e\"\n)\n\nWill attempt to recover by breaking constraint \n\u003cNSLayoutConstraint:0x6000024c6300 'BIB_Trailing_CB_Leading' H:[_UIModernBarButton:0x7fa914f2bbc0]-(6)-[_UIModernBarButton:0x7fa914f29320'Screen 1']   (active)\u003e\n\nMake a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.\nThe methods in the UIConstraintBasedLayoutDebugging category on UIView listed in \u003cUIKitCore/UIView.h\u003e may also be helpful.\n2021-10-07 13:11:44.841005-0700 Example[79258:7270897] [LayoutConstraints] Unable to simultaneously satisfy constraints.\n\tProbably at least one of the constraints in the following list is one you don't want. \n\tTry this: \n\t\t(1) look at each constraint and try to figure out which you don't expect; \n\t\t(2) find the code that added the unwanted constraint or constraints and fix it. \n(\n    \"\u003cNSLayoutConstraint:0x6000024c62b0 'BIB_Leading_Leading' H:|-(0)-[_UIModernBarButton:0x7fa914f2bbc0]   (active, names: '|':_UIButtonBarButton:0x7fa914f28600 )\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c7020 'UINav_static_button_horiz_position' _UIModernBarButton:0x7fa914f2bbc0.leading == UILayoutGuide:0x600003e77020'UIViewLayoutMarginsGuide'.leading   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c7070 'UINavItemContentGuide-leading' H:[_UIButtonBarButton:0x7fa914f28600]-(6)-[UILayoutGuide:0x600003e76f40'UINavigationBarItemContentLayoutGuide']   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c4230 'UINavItemContentGuide-trailing' UILayoutGuide:0x600003e76f40'UINavigationBarItemContentLayoutGuide'.trailing == _UINavigationBarContentView:0x7fa914f26830.trailing   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024bb700 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7fa914f26830.width == 0   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c45f0 'UIView-leftMargin-guide-constraint' H:|-(8)-[UILayoutGuide:0x600003e77020'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UINavigationBarContentView:0x7fa914f26830 )\u003e\"\n)\n\nWill attempt to recover by breaking constraint \n\u003cNSLayoutConstraint:0x6000024c62b0 'BIB_Leading_Leading' H:|-(0)-[_UIModernBarButton:0x7fa914f2bbc0]   (active, names: '|':_UIButtonBarButton:0x7fa914f28600 )\u003e\n\nMake a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.\nThe methods in the UIConstraintBasedLayoutDebugging category on UIView listed in \u003cUIKitCore/UIView.h\u003e may also be helpful.\n2021-10-07 13:11:44.848922-0700 Example[79258:7270897] [LayoutConstraints] Unable to simultaneously satisfy constraints.\n\tProbably at least one of the constraints in the following list is one you don't want. \n\tTry this: \n\t\t(1) look at each constraint and try to figure out which you don't expect; \n\t\t(2) find the code that added the unwanted constraint or constraints and fix it. \n(\n    \"\u003cNSLayoutConstraint:0x6000024c57c0 UIView:0x7fa914f31e50.trailing == _UIBackButtonMaskView:0x7fa914f314f0.trailing   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c68f0 'Mask_Trailing_Trailing' _UIBackButtonMaskView:0x7fa914f314f0.trailing == _UIButtonBarButton:0x7fa914f28600.trailing   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c6a30 'MaskEV_Leading_BIB_Trailing' H:[_UIModernBarButton:0x7fa914f2bbc0]-(0)-[UIView:0x7fa914f31e50]   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c7020 'UINav_static_button_horiz_position' _UIModernBarButton:0x7fa914f2bbc0.leading == UILayoutGuide:0x600003e77020'UIViewLayoutMarginsGuide'.leading   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c7070 'UINavItemContentGuide-leading' H:[_UIButtonBarButton:0x7fa914f28600]-(6)-[UILayoutGuide:0x600003e76f40'UINavigationBarItemContentLayoutGuide']   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c4230 'UINavItemContentGuide-trailing' UILayoutGuide:0x600003e76f40'UINavigationBarItemContentLayoutGuide'.trailing == _UINavigationBarContentView:0x7fa914f26830.trailing   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024bb700 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7fa914f26830.width == 0   (active)\u003e\",\n    \"\u003cNSLayoutConstraint:0x6000024c45f0 'UIView-leftMargin-guide-constraint' H:|-(8)-[UILayoutGuide:0x600003e77020'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UINavigationBarContentView:0x7fa914f26830 )\u003e\"\n)\n\nWill attempt to recover by breaking constraint \n\u003cNSLayoutConstraint:0x6000024c57c0 UIView:0x7fa914f31e50.trailing == _UIBackButtonMaskView:0x7fa914f314f0.trailing   (active)\u003e\n\nMake a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.\nThe methods in the UIConstraintBasedLayoutDebugging category on UIView listed in \u003cUIKitCore/UIView.h\u003e may also be helpful.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Fflowstacks-ios-15-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frightpoint%2Fflowstacks-ios-15-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Fflowstacks-ios-15-bug/lists"}