Group Group Group Group Group Group Group Group Group

Your Second iOS and SwiftUI App · Conclusion |

This is a companion discussion topic for the original entry at

thanks for the tutorials they’re really helpful.

I have an error when I try to build the code. on this line (where the indices used to be.) it says "Cannot convert value of type ‘[Task]’ to expected argument type 'Range ’

I even downloaded your code and still getting this error.

var body: some View {
NavigationView {
List {
ForEach(taskStore.tasks) { index in
RowView(task: self.$taskStore.tasks[index])

It sounds like you don’t have the extensions in your project, as I went over at 2:52 in this episode:

Let me know if you think something else is wrong!

thanks for the fast replied. the extensions are in my project I am not sure that is the issue, I had to use .indices to bypass the error and build it successfully but if I try to remove a task it throws a fatal error.

Huh! Upload your project and I’ll have a look!

(The fatal error is expected. I mean the version that you couldn’t get to compile.)

its okay no worries, I overwrote it with your version but I still get the same error if I remove the indices part from the ForEach when it was in the contentView file.

side question, which is the next class after building the second iOS app?

Beginning Table Views is up next; you can think of it as the UIKit version of this course.

I just completed recording more SwiftUI material, for a Layout in iOS course. It’s in editing now and will be ready soon!

The app crashes when I try to set a task completed. I am getting an error message Thread 1: Exec_Bad_Access in the appDelegate class. I can add a new task, it works fine but the pb is settting a task completed in the EditTaskView. Thanks

I’m not seeing this problem. Are you using the version of the project from the downloadable materials, or your own?

If it’s your own: Your Second iOS and SwiftUI App · Binding |

If not, please let me know what exact steps are triggering that!

I am using my own version of the project. But I did fix it. I had some lines of codes in the wrong places. Thanks for ur reply:)

1 Like

I had your problem, too.
The solution is to use the extension files that are in the “End” folder, not the “Begin” folder.
Hope this helps.

Hi, Jessy
I have a problem!
Why this course is so hard to understand especially the extension part?
Do you think it’s not better to teach some basics about those subjects at first?