I managed to get my project to build, i had to change to things:
Change from: @Relationship(.cascade, inverse: \VesselLocation.anchorLocation) to @Relationship(deleteRule: .cascade, inverse: \VesselLocation.anchorLocation)
Documentation of the new deleteRule: https://developer.apple.com/documentation/swiftdata/schema/relationship/deleterule-swift.enum
And i had to remove any default values from my model attributes. I had this:
@Model
final class Foo {
var bar: Bool = true
But that fails in Beta 6, but if you leave it empty it works:
@Model
final class Foo {
var bar: Bool
Post
Replies
Boosts
Views
Activity
@MobileTen how did you solve this? I'm experiencing the same thing in Beta 6, and I don't have macOS as a build target at all. Only iOS 17. I still get the error about .cascade not being a PropertyOptions member.
If i remove the .cascade option i get this error instead: Variable 'self._$backingData' used before being initialized. Project worked fine in Beta 5.