PushKit and reporting ongoing call

Hello


My app receives VoIP calls from two different channels.


1) If the app isn't running it gets started by didReceiveIncomingPushWithPayload and the app ends up calling reportNewIncomingCallWithUUID.


2) When the app is running it may receive the call via the TCP connection it has to the server backend. When that happens the app calls reportNewIncomingCallWithUUID. However in this case didReceiveIncomingPushWithPayload may also get called.


What shall the app do in senario 2? The call has already been reported by reportNewIncomingCallWithUUID so at the moment the app just ignores the didReceiveIncomingPushWithPayload and does nothing.

It seems to be working but I can't find any documentation that covers the above senario.


Having the server not send a push is not really an option. The server may think it has a TCP connection to the client but how long should it wait to establish a connection before giving up and send a push? There's always going to be a race condition where theres a TCP connection and a push being sent.