Your Second iOS and SwiftUI App · Dependency Injection | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5662524-your-second-ios-and-swiftui-app/lessons/7

Had an interesting bug crop up here. On the lines where Jessy changes the ContentView() call to ContentView( taskScore: TaskStore() ) he deletes the TaskStore placeholder and retypes the same code.

I neglected to delete the placeholder and just added the parenthesis. This creates a bug in the code whose “fix” is to delete the parenthesis but what really needs to happen is to delete the TaskStore placeholder and retype it.

@jsiles42 Thank you for the heads up - much appreciated! :]

@jsiles42 helped me saved so much time, thank you for this!

He just made me delete a bunch of stuff that I needed??? I can’t even do the next part of this because I cant even load the preview? Whats up with that?

I had the same issue. Thanks for posting the fix!

In my opinion the second app tutorial is much too advanced. There should be a tutorial in-between the first and the second app that will reinforce theory from the programming essentials video.

Starting a new app project now does not even include the scene delegate file - so this was a bit confusing. Ended up applying the same logic to TaskListApp.swift file.

It’s an option now.

Cool! I’ll look for that for the next project. Thanks for letting me know :slightly_smiling_face:

1 Like

@edwardgoomba Please check out the latest version of the course when you get a chance:

https://www.raywenderlich.com/15234721-your-second-ios-and-swiftui-app

I hope it helps!