0

我已经在我的应用程序中包含了呼叫者分机。存储号码有限制吗?Error Domain=com.apple.CallKit.error.calldirectorymanager Code=2 "(null)当我尝试保存超过 27,000 个数字时,它让我感到震惊(基本上加载中断)。我已经尝试搜索文档,但找不到。有人能指出我正确的方向吗?

func addAllIdentificationPhoneNumbers(to context: CXCallDirectoryExtensionContext) {
    
    let list = CallerExtensionHelper.shared.getPhoneList()//List of sorted phone numbers and description fetched from coreData
    if list != nil, let numbers = list as? [CallerID]{
                    context.removeAllIdentificationEntries()
        for savedNumber in numbers{
            let number:CXCallDirectoryPhoneNumber = savedNumber.number
                context.addIdentificationEntry(withNextSequentialPhoneNumber: number, label: savedNumber.name!)
        }
    }
}
4

0 回答 0