Group Group Group Group Group Group Group Group Group

SwiftUI · State & Binding: Part 2 |

This is a companion discussion topic for the original entry at

Just downloaded the materials for this lesson and I get the following error:

Assets.xcassets:1:1: The file “people-left-large@2x-d4415bd976ca5f8d78c2ae88c3948e15.png” for the image set “Team” does not exist.

When I look in the asset catalog folder, indeed, there is no file in the Team folder, but there are PNGs in the other folders for the other images.

Also, for the materials for this lesson, none of the view render in preview.

Hey Moebius, thanks so much for asking this question. The images are located in the Preview Assets where they are used only for rendering in the simulator, which is what we want for this situation. If you were shipping a production app, these would not be included in the app’s main bundle. However they absolutely should be rendering in Preview mode in a simulator. I’ve just double checked there and I’m seeing them render just fine in the sim. I can also locate the file in the folder. Can you just double-check that they’re not there and when running the app in a simulator please? I really appreciate it. Laurie.

Hey Isaac, could you please explain why did you add @ObservedObject to user property in BooksView and BookRow structures? I’ve removed both of them and app works as if were before

SOLVED? I have been running the app in the iPhone 11 Pro simulator. When I switched to iPhone 11 Pro Max, everything started working. Not sure why, but there appears to be something wrong with the BookRow UI on iPhone 11 Pro.

Also getting this error reported by the SwiftUI Preview:
PotentialCrashError: may have crashed may have crashed. Check ~/Library/Logs/DiagnosticReports for any crash logs from your application.


| Error Code=12 “Rendering service was interrupted” UserInfo={NSLocalizedDescription=Rendering service was interrupted}

When I remove the following lines from ContentView.swift the preview works:

      ScrollView(.horizontal, showsIndicators: false) {
        BooksView(user: self.user, books: $books.value)
        .shadow(color: .black, radius: 10, x: 20, y: 20)

Thanks! We tried to use a variety of sims but we ran into lots of strange issues. I’m sure these will clear up as development continues. However, thanks so much for your input in this course! :hugs: