2

I'm start to using the CallKit to identify numbers. After many bug it's working, but I don't find a way to update a label after if changes. For now I know that works if I remove the identification and add it again calling the CXCallDirectoryManager.sharedInstance.reloadExtension two times (in the first time I remove and in the second I add the updated label for the same number).

Is it possible do that just with one call?

//to remove I'm using:
context.removeIdentificationEntry(withPhoneNumber: 1234567890)

//to add:
context.addIdentificationEntry(withNextSequentialPhoneNumber: 1234567890, label: "new label")
Zee
  • 1,865
  • 21
  • 42

1 Answers1

0

At this point in time, this is the only way.

According to Apple's documentation, there are only 2 methods to add a new entry.

// Adds a blocking entry with the specified phone number.
func addIdentificationEntry(withNextSequentialPhoneNumber: CXCallDirectoryPhoneNumber, label: String)

// Adds a blocking entry with the specified phone number.

func addBlockingEntry(withNextSequentialPhoneNumber: CXCallDirectoryPhoneNumber)

They also provide 4 ways to remove or clear entries.

func removeAllBlockingEntries()
func removeAllIdentificationEntries()
func removeBlockingEntry(withPhoneNumber: CXCallDirectoryPhoneNumber)
func removeIdentificationEntry(withPhoneNumber: CXCallDirectoryPhoneNumber)

But...nothing on updating existing entries.