After install XCode 15 beta 6:
@Model
class WordResult {
var text = ""
var translation:[String] = []
init(){
}
}
got this error:
Variable 'self._$backingData' used before being initialized
so I changed to :
@Model
class WordResult {
var text:String
var translation:[String]
init(){
self.text = ""
self.translation = []
}
}
Then got this:
CloudKit integration requires that all attributes be optional, or have a default value set
It seems it can not work with cloudkit now.
It's fixed in Xcode 15.0 beta 7!!