nalexn / clean-architecture-swiftui

SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.
MIT License
5.57k stars 671 forks source link

Question about back navigation in simulator #4

Closed omaralbeik closed 3 years ago

omaralbeik commented 4 years ago

Thank you for the project @nalexn!

Could you please explain the following check for simulator 🤔

https://github.com/nalexn/clean-architecture-swiftui/blob/96af019bd581576531d4f0cd29fc34bcc629ebc1/CountriesSwiftUI/UI/Screens/CountryDetails.swift#L30

It is causing the details page not to pop back if it is presented by tapping a parent details page

nalexn commented 4 years ago

Hey Omar, there is a bug in SwiftUI that basically crashes the app on the simulator when you try to pop the screen back.

omaralbeik commented 4 years ago

I see, looks like changing the navigation link to:

NavigationLink(destination: self.detailsView(country: country)) {
    CountryCell(country: country)
}

is solving this particular issue, but then tapping on the last pushed country in the list after dismissing details is not showing details

nalexn commented 3 years ago

Ok, the bug has been fixed in iOS 13.5 and so I could finally remove that workaround. Closing this issue.