Callkit APNS rejecting calls bug!

Hi,
The issue:
1.Device A(real device) calling Device B(real device)
2.Call notification appears on Device B
3.I reject call from Device B
4.Device A doesn’t register any change and keeps the call screen in the same state

The code:
I’ve cloned this repo:https://github.com/cometchat-pro/ios-swift-chat-push-notification-app
Followed the guide on implementing APNS from here:https://www.cometchat.com/docs/extensions/ios-apns-push-notifications

I have no actual errors and the push notifications work well, if I answer the call both devices register the change and the call is active.
I have tried both master and V3 branches.

Hi,

You can dismiss the call kit screen by referring to the below article. There are many solutions available over the internet.

https://www.titanwolf.org/Network/q/01959535-7efa-4669-8671-683f1e527382/y

this will help you.

regards,
Pushpsen R. Airekar

Thanks for the answer but i was expecting cometchat to have this already implemented in the sample apps or in the implementation guides. So basically i have to implement the reject call functionality myself.

So the answer had nothing to do with my question, and the sample apps just miss important implementations(rejecting incoming call, cancelling outgoing call etc), pretty bad experience for a user with a paid plan.
My solution for the described problem:

  1. Change onOutgoingCallRejected function from PushNotification class in sample app to this:
    func onOutgoingCallRejected(rejectedCall: Call?, error: CometChatException?) {
    DispatchQueue.main.async{
        if let call = rejectedCall {
            CometChatCallManager.outgoingCallDelegate?.onOutgoingCallRejected(rejectedCall: call, error: error)
        }
     
      let snackbar: CometChatSnackbar = CometChatSnackbar.init(message: "Call Rejected", duration: .short)
        snackbar.show()
    }
    }
    

2.For some unknown reason the code is commented in didRejectButtonPressed function from the same class, so uncomment and it will look like this:

@objc func didRejectButtonPressed(_ notification: NSNotification) {
    if let currentCall = call {
        CometChat.rejectCall(sessionID: currentCall.sessionID ?? "", status: .rejected) { (call) in
            
        } onError: { (error) in
            
        }
    }
 }

Now i’m working on fixing outgoing call rejected which isnt updating on the callee screen.
Please update your docs and your sample apps!

Hi @radu.ghitescu,

Sorry for the inconvenience.

We are going to take up the enhancements for the call kit, but we cannot assure you the exact timeline regarding the same at this moment.

We’ll update you once we update our sample app with this issue fixed.

Regards,
Pushpsen R. Airekar