Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 设置核心数据,NSPersistentCloudKitContainer以便我的数据将自动具有 CloudKit 集成。我遇到的问题是我的实体中不再有可选属性。我的所有可选属性都会生成编译器错误
NSPersistentCloudKitContainer
[entity].[attribute] 必须有一个默认值
这是一个错误吗?这个问题有什么好的解决方法吗?
It seems to be fixed in Xcode 11 beta 3.
“解决方案”只是使所有链接都是可选的。在 XCode 11 GM 上,这仍然是一样的,不要认为它在任何 xcode beta 中都是“固定的”。
我认为原因是它同步到 CloudKit 的方式,他们希望完全控制实体类型的同步,因此链接可能会在短时间内断开。