UIScreen.main.boundsVisionOS上有类似的东西吗?
不幸的是,我有一些取决于屏幕尺寸的代码,并且使用硬编码值并不能真正解决问题。
\ncontext.addIdentificationEntry(withNextSequentialPhoneNumber: contact.number, label: contact.contactLabel)\n该应用程序的想法是将大约 50.000 个联系人添加到 CallKit 目录中,但是当我尝试在方法中添加它们时,beginRequest(with context: CXCallDirectoryExtensionContext)我经常会收到 com.apple.CallKit.error.calldirectorymanager 错误 2 或一些奇怪的 sqlite3 错误:
sqlite3_step for query \'INSERT INTO PhoneNumberIdentificationEntry \n(extension_id, phone_number_id, label_id) VALUES (?, (SELECT id \nFROM PhoneNumber WHERE (number = ?)), (SELECT id FROM Label WHERE \n(localized_label = ?))), \n\xe2\x80\xa6\n(SELECT id FROM Label WHERE (localized_label = ?)))\' returned 19 \n(2067) errorMessage \'UNIQUE constraint failed: \nPhoneNumberIdentificationEntry.extension_id, \nPhoneNumberIdentificationEntry.phone_number_id, \nPhoneNumberIdentificationEntry.label_id\'\nRun Code Online (Sandbox Code Playgroud)\n\n一般来说,我从服务器获取联系人并尝试使它们保持同步 - 因此,我使用 Realm 将它们保存在本地。有谁知道如何处理此类错误?
\n