Learn Courses My Dashboard

Module 4 Lesson 15 Wrap Up Challenge after new Xcode release

Hello everyone, have you checked the app after the new Xcode release?
The app is now working incorrectly.
After each tap or action with the UI, the app sends me to the home page.

Does someone know how we can be up to date with new Xcode or Swift changes?
Now I have no idea how to fix the app as it was built correctly …

Yup, you are right. Discovered that myself while helping out someone else with an issue on that same project. I have notified Chris Ching as he too has only recently updated to Xcode 12.5 and would not have been aware of the impact since he is busy recording content for future lessons elsewhere.

I changed my Book model to a class which succeeded in stopping the View crashing back to the Home page but changes to the data were not being reflected properly and consistently so I really don’t know what the answer is.

1 Like

Thank you for your attention)

Just ran into this today myself. After fooling around a little bit I realized there was no issues beyond the first book that I tapped on. Couldn’t figure out what was different about the first book…I finally thought it may have something to do with the fact I was using a LazyVStack. I still don’t quite understand the mechanics of what’s going on there, but change your Lazy to a regual VStack, if you were using a Lazy like I was. Hah it took me all day to nail down what it was, it’s 1:30 AM now, I just couldn’t let it go til I figured it out. With there only being 5 books obviously it’s fine to just use a regular VStack, that being said if the list were long, something else would probably need to be done. I’m guessing it might involve a function that’s called when the ListView first appears, or something… trying all that stuff out will have to wait. Hope that works for you!

1 Like

Just a followup on this issue.

The problem is caused by the NavigationLink and is a known issue in iOS 14.5. Known to some but not everyone it seems. The symptom varies in that

  • when you tap on the link you go to the next view and are then immediately popped back to the previous view OR
  • you tap on the link and are taken to the next view and on tapping a button or tapping a picker you are then popped back to the previous view.

The interim solution is to add another NavigationLink below the existing NavigationLink as per the following:

NavigationLink( destination: EmptyView()) {

Discussion forum links:

1 Like