Ios 经常遇到';CXErrorCodeCallDirectoryManager错误当前加载';调用CXCallDirectoryManager.reloadExtension时出现错误7

Ios 经常遇到';CXErrorCodeCallDirectoryManager错误当前加载';调用CXCallDirectoryManager.reloadExtension时出现错误7,ios,callkit,Ios,Callkit,在CallDirectory管理器上调用reloadExtension时,我经常收到错误代码7。扩展启用微调器将始终加载 我正在使用callkit扩展将数据写入calldirectory。我有200-500个联系人,这些联系人被保存到一个共享应用程序组中,该应用程序组由主机应用程序和分机使用 主机应用程序将向该文件写入数据。在扩展的beginRequest中,我将通过调用for循环中的context.addIdentificationEntry来添加所有标识(数字标签对)。我已经尝试过自动释放池

在CallDirectory管理器上调用reloadExtension时,我经常收到错误代码7。扩展启用微调器将始终加载

我正在使用callkit扩展将数据写入calldirectory。我有200-500个联系人,这些联系人被保存到一个共享应用程序组中,该应用程序组由主机应用程序和分机使用

主机应用程序将向该文件写入数据。在扩展的beginRequest中,我将通过调用for循环中的context.addIdentificationEntry来添加所有标识(数字标签对)。我已经尝试过自动释放池,并在批处理中使用dispatch async,但不起作用

我有3个文件来存储NSArray中要添加或删除的数据

1. First one is a file for all contacts, which should be used when the request is not incremental.

2. Second file is the incremental add, which will be used when it is a incremental request.

3. Third file is the records need to be removed.

对初始设置或增量最佳实践有何建议?或者如何使加载时间可以接受?

结果是我在**非增量**重新加载中调用了removeAllIdentification。拆下这条线后,分机工作正常非常感谢!调试此问题时,我损失了几个小时。
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *containerURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:self.groupIdentifier];
containerURL = [containerURL URLByAppendingPathComponent:@"CallDirectoryData"];
NSString* filePath = containerURL.path;
NSArray *list = [NSArray arrayWithContentsOfFile:filePath]; // list is already sorted.
for(NSDictionary *record in list) {
    [context.addIdentificationEntry [record valueForKey: @"phone"] forLabel: @"label"]
}