SwiftDataFlashCardSample doesn't compile

I just installed Xcode beta 6 and tried compiling the SwiftData sample app. It fails with a couple of dozen compile errors. Clearly this must have worked for WWDC23 so what's gone wrong?

The following says type 'Card' does not conform to protocol 'PersistentModel'

@Model final class Card: PersistentModel {

This seems pretty basic.

Any suggestions

Why do you explicitly mention PersistentModel conformance when @Model already conforms to PersistentModel?

Code (compiles fine)

@Model
final class Card {
    var front: String
    var back: String
    var creationDate: Date

    init(front: String, back: String, creationDate: Date = .now) {
        self.front = front
        self.back = back
        self.creationDate = creationDate
    }
}

Did you miss

I believe the sample project is faulty. If you create a new project, copy the files over and run it you'll find it works fine...

SwiftDataFlashCardSample doesn't compile
 
 
Q