CXCallDirectoryExtensionContextDelegate doesn't handle errors

Hello! I know that nobody here will answer this question, but I will try.


I have Call Directory Extension with default error handler


context.delegate = self


extension CallDirectoryHandler: CXCallDirectoryExtensionContextDelegate {
  func requestFailed(for _: CXCallDirectoryExtensionContext, withError error: Error) {
    // An error occurred while adding blocking or identification entries, check the NSError for details.
    // For Call Directory error codes, see the CXErrorCodeCallDirectoryManagerError enum in .
    //
    // This may be used to store the error details in a location accessible by the extension's containing app, so that the
    // app may be notified about errors which occured while loading data even if the request to load data was initiated by
    // the user in Settings instead of via the app itself.
    NSLog("Callkit error: \(error.localizedDescription)")
  }
}


When I add data with unsorted numbers I have an error. In console I see next:


com.apple.CallKit.CallDirectory Cannot add identification phone number *** since it is less than the last phone number ***, returning error
com.apple.CallKit.CallDirectory Timed out while notifying extension about request failure, proceeding to cancel extension request
com.apple.CallKit.CallDirectory Request with requestIdentifier  was cancelled. Error: Error Domain=NSExtensionErrorDomain Code=-2 "Extension cancelled by host." UserInfo={NSLocalizedDescription=Extension cancelled by host.}
com.apple.CallKit.CallDirectory Error requesting data for extension with identifier : Error Domain=com.apple.CallKit.error.calldirectorymanager Code=3
com.apple.CallKit.CallDirectory error: Error Domain=NSCocoaErrorDomain Code=4099 UserInfo={NSDebugDescription=}


And error handler CXCallDirectoryExtensionContextDelegate didn't print anything, because it's not working.

Why?

What about "Timed out while notifying extension about request failure, proceeding to cancel extension request"?

How to observe this notification?


Thank you!

  • @shmakova Sorry I know it's been a long time. Did you figure out the problem? We're facing the same problem in current project. Would appreciate any suggestion.

Add a Comment

Replies

😢😢😢