iOS-在本机iOS最近通话表视图中单击呼叫者时触发传出VOIP呼叫 [英] iOS - Trigger outgoing VOIP Call on clicking the caller in the native iOS Recent call table view

查看:163
本文介绍了iOS-在本机iOS最近通话表视图中单击呼叫者时触发传出VOIP呼叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为我的应用实现了CallKit,以通过使用WebRTC在我们的应用内触发/接收音频和视频通话.可以无缝运行,没有任何问题.

I have implemented the CallKit for my App to trigger/receive both Audio and Video Call within our App by using WebRTC. Which is working seamlessly without any problem.

如我所见,有3种方法可以触发来自呼叫工具包的呼叫.

As I see there are 3 ways to trigger a call from Call Kit.

  1. 在应用程序内进行交互
  2. 使用受支持的自定义URL方案打开链接
  3. 使用Siri发起VoIP通话

到目前为止,我还没有使用Siri发起呼叫的任何要求,但是当用户单击本机iOS最近呼叫"屏幕中的任何单元时,我们需要发起呼叫,然后路由到我们的应用程序并触发外出通话.

As of now, I don't have any requirement to initiate the call using Siri but we need to initiate the call when the user clicks on any cell in the native iOS Recent calls screen which then routes to our application and triggers the out going call.

而且,当用户呼叫另一个用户时,我们的应用程序包含的元数据很少,例如ReceiverID等.因此,当该用户未接听另一个用户的呼叫时,我需要存储此元数据,并且当用户呼叫另一个用户时,我需要触发呼叫使用所有这些元数据点击"iOS最近通话"屏幕的未接来电列表.

And also our app contains few metadata when user calls the other user such as receiverID etc.. So when the user misses the call from the other user, I need to store this meta data and I need to trigger a call when user clicks on missed call list of iOS Recent call screen using all those metadata.

我正在查看Apple提供的CallKit"Speakerbox"示例应用程序.而且我发现他们正在使用自定义URL方案,就像我们在iOS应用程序的DeepLink中使用的方案一样.

I was going through the Sample App for CallKit "Speakerbox" provided by Apple. And I found that they are using custom URL scheme just like what we use for DeepLinking of iOS apps.

因此,我几乎不需要建议是否可以使用URL方案来实现,如果可以,如何将元数据(自定义对象)存储在CXHandle对象中.

So I need few suggestion whether this can be achieved using URL scheme and If so, How can I store the metadata ( custom object ) in CXHandle object.

推荐答案

在我这里粘贴相同的答案:

Pasting the same answer here from me: Refer

验证remoteHandle和supportedHandleType,两者都应与您的要求相似.

Verify the remoteHandle and supportedHandleTypes, both should be similar as per your requirement.

callUpdate.remoteHandle = [[CXHandle alloc] initWithType:CXHandleTypeGeneric value:[NSString stringWithFormat:@"%@", phoneno]];
configuration.supportedHandleTypes = [NSSet setWithObjects:[NSNumber numberWithInteger:CXHandleTypeGeneric],[NSNumber numberWithInteger:CXHandleTypePhoneNumber], nil];

如果句柄不匹配,则无法处理NSUserActivity.

If the handles mismatches, you can't able to process the NSUserActivity.

实施此方法以获取回调,

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray * _Nullable))restorationHandler {}

这篇关于iOS-在本机iOS最近通话表视图中单击呼叫者时触发传出VOIP呼叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆