我正在使用 Swift 和 Xcode 13.1 编写一个 iOS 应用程序。我正在使用联系人框架,我读到每个应用程序都有一个默认的联系人容器,并且一个应用程序中的默认容器可以与另一个应用程序中的默认容器不同,并且整个设备没有默认容器。
什么决定了 Xcode 项目创建的应用程序的默认容器是什么?我没有为我的应用程序设置默认容器,并且不知何故,Google 帐户的联系人容器成为我的应用程序的默认联系人容器。如何使用代码为我的应用设置默认联系人容器?
如何找出 iOS 随附的 Apple 通讯录应用程序的默认容器?我想将我的应用程序的默认联系人容器设置为与 Apple 的联系人应用程序相同的默认容器,如果那是保存在 iCloud 上的联系人容器。如果没有,我想将我的应用程序的默认联系人容器设置为保存在 iCloud 中的联系人容器。我假设只有一个联系人容器保存在 iCloud 上。