Post

Replies

Boosts

Views

Activity

Type does not conform to protocol 'PersistentModel'
I have the following and it's working. However, if I add a new String property, it suddenly returns the error above. This new property is added as a variable, initialized and conformed to hashable accordingly. @Model final class Car { var name: String var price: Double var remarks: String? var releaseDate: Date var brand: CarBrand init(name: String, price: Double, remarks: String?, releaseDate: Date, brand: CarBrand) { self.name = name self.price = price self.remarks = remarks self.releaseDate = releaseDate self.brand = brand } } extension Car: Identifiable {} extension Car: Hashable { static func == (lhs: Car, rhs: Car) -> Bool { lhs.name == rhs.name && lhs.price == rhs.price && lhs.remarks == rhs.remarks && lhs.releaseDate == rhs.releaseDate && lhs.brand == rhs.brand } func hash(into hasher: inout Hasher) { hasher.combine(name) hasher.combine(price) hasher.combine(remarks) hasher.combine(releaseDate) hasher.combine(brand) } } enum CarBrand: String, Codable, CaseIterable, Identifiable { case brandA case brandB case brandC var id: Self { self }
2
0
2.6k
Jun ’23
Type does not conform to protocol 'PersistentModel'
I have the following and it's working. However, if I add a new String property, it suddenly returns the error above. This new property is added as a variable, initialized and conformed to hashable accordingly. @Model final class Car { var name: String var price: Double var remarks: String? var releaseDate: Date var brand: CarBrand init(name: String, price: Double, remarks: String?, releaseDate: Date, brand: CarBrand) { self.name = name self.price = price self.remarks = remarks self.releaseDate = releaseDate self.brand = brand } } extension Car: Identifiable {} extension Car: Hashable { static func == (lhs: Car, rhs: Car) -> Bool { lhs.name == rhs.name && lhs.price == rhs.price && lhs.remarks == rhs.remarks && lhs.releaseDate == rhs.releaseDate && lhs.brand == rhs.brand } func hash(into hasher: inout Hasher) { hasher.combine(name) hasher.combine(price) hasher.combine(remarks) hasher.combine(releaseDate) hasher.combine(brand) } } enum CarBrand: String, Codable, CaseIterable, Identifiable { case brandA case brandB case brandC var id: Self { self }
Replies
2
Boosts
0
Views
2.6k
Activity
Jun ’23
Can Xcode Cloud upload builds someplace else other than TestFlight?
Can Xcode Cloud upload builds someplace else other than TestFlight? For example, TestFairy, HockeyApp, Firebase App Distribution, Kobiton, Diawi, Install On Air, etc.
Replies
0
Boosts
0
Views
945
Activity
Jun ’21