You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct Person {
var name: String
var scores: [Int]?
}
let person = Person(name: "v")
sync person
When scores is empty, initializing a CKRecord is not possible. cannot use an empty list to initialize a new field
Once a value has been set for an optional property and it has been synced to iCloud, it cannot be set back to nil and synced to iCloud again. It will always sync with the iCloud value.
func encode<T>(_ value: T, forKey key: Key) throws where T : Encodable {
Values should not be set for fields that cannot be nil.
cannot use an empty list to initialize a new field
This error sounds like you're attempting to initialize a new field for a record in the development environment, which also defines its schema. When that's the case, then there must be some sort of value to inform the CloudKit servers what type of list you're trying to create, since it's a brand new field that the servers don't know about.
I don't think this would be a problem for existing record fields.
Do I have an optional array type field such as [Int]? How to fix this error
The text was updated successfully, but these errors were encountered: