gpt4 book ai didi

ios - 添加被邀请者时,EKEventEditViewController SGErrorDomain代码= 8

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:34:25 24 4
gpt4 key购买 nike

我试图通过带有有效EKEvent实例的EKEventEditViewController创建EKEventStore(用户已授予日历和事件的权限)。
每次我点击以添加“受邀者”时,“受邀者”搜索对话框都会打开以进行搜索,并且在键入搜索时,UI冻结(与正常运行的本机“日历”应用相比),出现以下错误:

Error Domain=SGErrorDomain Code=8 "(null)" for fetching in store:
<CNSuggestedContactStore: 0x151ffa9b0> with predicate: <CNiOSABContactIdentifiersPredicate:
0x1521768f0: kind=-[CNContact predicateForContactsWithIdentifiers:],
identifiers=("A2AD81DE-73C9-4AFB-99DC-FA491B7C2706:ABPerson)>"

要么
Error Domain=SGErrorDomain Code=8 "(null)" for fetching in store:
<CNSuggestedContactStore: 0x151ffa9b0> with predicate: <CNiOSABContactIdentifiersPredicate:
0x152158910: kind=-[CNContact predicateForContactsWithIdentifiers:],
identifiers=("6905A79B-001E-448E-93C2-C7460FEAAF78)>"

UI冻结结束后,将列出联系人,并在几次冻结后的某个时间正确地进行搜索,或者只是应用崩溃。
对于所有=> 9的iOS版本,都会发生这种情况,但在较早的iOS版本中则不会发生。

任何建议,将不胜感激!

谢谢!

最佳答案

我尝试了几种不同的方法。最终可行的是请求访问用户联系人。我相信是因为日历正在从您的应用程序内访问用户联系人。

添加NSContactsUsageDescription
https://developer.apple.com/documentation/contacts#1773385

关于ios - 添加被邀请者时,EKEventEditViewController SGErrorDomain代码= 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34083903/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com