How many numbers can a call directory extension have?

Hi, I got a CXErrorCodeCallDirectoryManagerErrorLoadingInterrupted error when I added 126000 phone numbers to a call directory extension. How can I add more numbers? Thanks!

Replies

(in iOS10 beta2)

Hi,


I also asked this in a different thread.


What I recognized for Beta 2 is that all "phoneNumbers" must have the same number of digits. If one has a different number of digits then the Extension will not be loaded ("+" will be also counted e.g. as "00")


context.addIdentificationEntry(withNextSequentialPhoneNumber: phoneNumber, label: label)


My problem is that I want to import the phone numbers from Core Data but the fetch request fails when I request more then 5000 data - anyhow in the main application the fetch request is working.


How do you import over 100,000 numbers.


Thx,

jvc

just playing around...


It is no problem to add 1,000,000 phone numbers. After activation the extension needs only some time to go through...


I simply tested with following code:


var number = 4915148000000
repeat {
    context.addIdentificationEntry(withNextSequentialPhoneNumber: "+" + String(number), label: "Extension: +" + String(number))
    number = number + 1
} while number < 4915149000000


So it is no problem to add a large amount of numbers.


The only thing is that extensions are short of memory - mentioned by apple. So it is not possible to keep the whole list in memory.


So this is not possible:


var list: (phoneNumbers: [String], labels: [String]) = ([], [])
var number = 4915148000000
repeat {
    list.phoneNumbers.append("+" + String(number))
    list.labels.append("Extension: +" + String(number))
    number = number + 1
} while number < 4915149000000

for (phoneNumber, label) in zip(list.phoneNumbers, list.labels) {
    context.addIdentificationEntry(withNextSequentialPhoneNumber: phoneNumber, label: label)
}


jvc

  • It is not working. Xcode says "the app has been killed by the operating system because it is using too much memory"

    I tried to debug the code the same as your code(count 1,000,000)

    I think it is not available anymore. (The article is written 7 years ago)

Add a Comment

Great! Your answer helps me a lot. In objective-c language, this error occurs, but in swift launguage, it's OK. Thanks a lot!

So what you are saying is that due to memory it's not possible to have a large dataset in memory for identification. Or am i missing something?