6

While requesting a CXTransaction with a CXEndCallAction, the transaction fails with error code Error Domain=com.apple.CallKit.error.requesttransaction Code=4 "(null)"

I was able to make a CXStartCallAction successfully. Does anyone know what this error means?

David Dong
  • 101
  • 1
  • 5

2 Answers2

14

The error codes for CallKit are defined in <CallKit/CXError.h>, and in iOS 10 Seed 4, error code 4 for domain com.apple.CallKit.error.requesttransaction is defined as:

CXErrorCodeRequestTransactionErrorUnknownCallUUID = 4,

This indicates that the call UUID for the requested CXEndCallAction did not correspond to an known call. I recommend confirming that the UUID set on the CXEndCallAction matches an existing call.

Stuart M
  • 11,458
  • 6
  • 45
  • 59
  • 1
    Thanks, I use **reportCallWithUUID: updated** when I use start transaction. – passol Oct 24 '16 at 11:12
  • For those who need to look up Error codes and their description checkout https://www.osstatus.com – Sharukh Mastan May 17 '18 at 21:26
  • I checked this and the callUUID is the same with the existing call. Is there any other reason to get this error code ? – C. Kontos Oct 25 '19 at 13:59
  • @passol can you give all code for end all call before report new incoming call? Or you can help me here https://stackoverflow.com/questions/64024502/ios-pushkit-end-last-call-before-reportnewincommingcall, thanks – famfamfam Sep 23 '20 at 09:53
2

If you use

func reportCall(with UUID: UUID, updated update: CXCallUpdate)

to update CXStartCallAction with CXCallUpdate you MUST use action.uuid, not action.callUUID.

Later leads to unknownCallUUID error on call ending. In this case

func provider(_ provider: CXProvider, perform action: CXEndCallAction)

does not fire.

malex
  • 9,874
  • 3
  • 56
  • 77