升级到 Xcode 13.0 (13A233) 后,以下代码用于 Xcode 12
let publicOptions = NSPersistentCloudKitContainerOptions(containerIdentifier: containerIdentifier)
publicOptions.databaseScope = .public
产生错误:Value of type 'NSPersistentCloudKitContainerOptions' has no member 'databaseScope'
事实上,当我点击NSPersistentCloudKitContainerOptions
它时,它会显示CoreData
没有databaseScope
.
我的部署目标是 iOS 14,它曾经与 Xcode 12 一起工作了很长时间。此外,它现在在几个项目中被破坏,包括使用 Xcode 12 创建的项目,即最近的项目。如何解决这个问题?