From 10e748609397ac00f39764d61f10c604278eac86 Mon Sep 17 00:00:00 2001 From: -g Date: Wed, 11 Oct 2023 06:49:31 +0000 Subject: [PATCH 1/3] CallKit ReadMe Update --- README.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8079364a..3b59b35d 100644 --- a/README.md +++ b/README.md @@ -512,9 +512,24 @@ extension AppDelegate : CXProviderDelegate { __*Reporting calls with CallKit*__ -To properly report calls to callKit with right statuses, you need to invoke the following callKit methods at the right instances : +To properly report calls to callKit with right statuses, you need to invoke the following callKit methods at the right instances: -Use `provider.reportNewIncomingCall(with: uuid, update: callUpdate)` to report an incoming call. +1. Starting A New Call : When ever you start a call, report to callkit using the `provider.reportCall()` method. + +```Swift + let callUpdate = CXCallUpdate() + + callUpdate.remoteHandle = callHandle + callUpdate.supportsDTMF = true + callUpdate.supportsHolding = true + callUpdate.supportsGrouping = false + callUpdate.supportsUngrouping = false + callUpdate.hasVideo = false + provider.reportCall(with: uuid, updated: callUpdate) +``` + +2. When user receives a Call : Use `provider.reportNewIncomingCall(with: uuid, update: callUpdate)` to report an incoming call. This informs callKit +to provide the native call interface to the user. ```Swift guard let provider = callKitProvider else { @@ -531,7 +546,8 @@ Use `provider.reportNewIncomingCall(with: uuid, update: callUpdate)` to report a } ``` -Use `provider.reportOutgoingCall(with: callKitUUID, connectedAt:nil)` to report a connected outgoing call. +3. When user answers a call : Use `provider.reportOutgoingCall(with: callKitUUID, connectedAt:nil)` to report a connected outgoing call. This informs callKit +about when the call was actua ```Swift if let provider = self.callKitProvider, let callKitUUID = self.callKitUUID { @@ -608,9 +624,7 @@ func provider(_ provider: CXProvider, perform action: CXEndCallAction) { ended on the callee side once a connection is established. -2. Logs on the receiver's end are necessary to thoroughly debug issues related to push notifications. However, the debugger is not attached when the app is completely killed. To address this, the app can simply be placed in the background. VOIP push notifications should then come through, and the debugger should record all logs. You can filter logs using the keyword 'TxClient' to isolate all SDK-related messages - - ![image](https://github.com/team-telnyx/telnyx-webrtc-ios/assets/134492608/e04b9ade-9390-452c-a078-3386ace8d0c2) +2. Logs on the receiver's end are necessary to thoroughly debug issues related to push notifications. However, the debugger is not attached when the app is completely killed. To address this, the app can simply be placed in the background. VOIP push notifications should then come through, and the debugger should record all logs. From e012f1f88927d12942d1dbecf20ea562b0d176c6 Mon Sep 17 00:00:00 2001 From: -g Date: Wed, 11 Oct 2023 07:06:37 +0000 Subject: [PATCH 2/3] Update CallKit Methods ReadMe --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3b59b35d..c2e333f0 100644 --- a/README.md +++ b/README.md @@ -546,8 +546,7 @@ to provide the native call interface to the user. } ``` -3. When user answers a call : Use `provider.reportOutgoingCall(with: callKitUUID, connectedAt:nil)` to report a connected outgoing call. This informs callKit -about when the call was actua +3. When callee answers an outgoing call : Use `provider.reportOutgoingCall(with: callKitUUID, connectedAt:nil)` to report a connected outgoing call. This informs callKit about what time an outgoing call went active. ```Swift if let provider = self.callKitProvider, let callKitUUID = self.callKitUUID { @@ -555,6 +554,7 @@ about when the call was actua provider.reportOutgoingCall(with: callKitUUID, connectedAt:date) } ``` +NB : This should be used only when the call is outgoing. ### Best Practices when Using PushNotifications with Callkit. From 6e2b7080c04e582e188d790f1e0d7e39474f7b78 Mon Sep 17 00:00:00 2001 From: isaacakakpo1 <134492608+isaacakakpo1@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:40:56 +0000 Subject: [PATCH 3/3] Update README.md --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c2e333f0..1bcea737 100644 --- a/README.md +++ b/README.md @@ -528,8 +528,7 @@ To properly report calls to callKit with right statuses, you need to invoke the provider.reportCall(with: uuid, updated: callUpdate) ``` -2. When user receives a Call : Use `provider.reportNewIncomingCall(with: uuid, update: callUpdate)` to report an incoming call. This informs callKit -to provide the native call interface to the user. +2. When user receives a Call : Use `provider.reportNewIncomingCall(with: uuid, update: callUpdate)` to report an incoming call. This sends a request to callKit the to provide the native call interface to the user. ```Swift guard let provider = callKitProvider else { @@ -546,7 +545,7 @@ to provide the native call interface to the user. } ``` -3. When callee answers an outgoing call : Use `provider.reportOutgoingCall(with: callKitUUID, connectedAt:nil)` to report a connected outgoing call. This informs callKit about what time an outgoing call went active. +3. When callee answers an outgoing call : Use `provider.reportOutgoingCall(with: callKitUUID, connectedAt:nil)` to report a connected outgoing call. This provides the time when the outgoing call goes to active to callKit. ```Swift if let provider = self.callKitProvider, let callKitUUID = self.callKitUUID { @@ -624,7 +623,7 @@ func provider(_ provider: CXProvider, perform action: CXEndCallAction) { ended on the callee side once a connection is established. -2. Logs on the receiver's end are necessary to thoroughly debug issues related to push notifications. However, the debugger is not attached when the app is completely killed. To address this, the app can simply be placed in the background. VOIP push notifications should then come through, and the debugger should record all logs. +2. Logs on the receiver's end are essential for thorough debugging of issues related to push notifications. However, the debugger is not attached when the app is completely killed. To address this, you can simply put the app in the background. VOIP push notifications should then come through, and the debugger should capture all logs.