问题描述
我正在VoIP应用程序中实现CallKit支持。
I'm implementing CallKit support inside a VoIP application.
我可以通过设置 supportsVideo $ c $禁用视频按钮c>到
false
在 CXProviderConfiguration
中。现在出现了FaceTime按钮。
I was able to disable video button by setting supportsVideo
to false
in CXProviderConfiguration
. Now the FaceTime button appeared.
我想知道是否有办法在默认用户界面中禁用FaceTime按钮,因为该应用正在处理内部企业号码与FaceTime有关。
I wanted to know if there is a way to disable FaceTime button in the default UI, since the app is handling internal enterprise numbers which has nothing to do with FaceTime.
更新:
如下面的答案所述,可以禁用该按钮,但是来电号码丢失(显示为未知
)。我想保留数字并禁用FaceTime按钮。
Update:As stated in the answers below, it's possible to disable the button, but the caller number is lost (shown as Unknown
). I want to preserve the number and disable the FaceTime button.
更新:
在iPhone设置中禁用FaceTime会禁用FaceTime按钮。但是,这不是解决问题的有效方法。
Update:Disabling FaceTime in iPhone settings disables the FaceTime button. However it's not a valid solution to the issue.
更新:
任何更改为 CXHandle
类型,包括插入对电话号码无效的字符,不会影响问题 - 仍会显示FaceTime按钮。
Update:Any changes to CXHandle
type, including inserting characters not valid for a phone number into it, does not affect the issue - FaceTime button is still shown.
推荐答案
在好消息/坏消息中,我通过清除 remoteHandle
来禁用FaceTime按钮(没有删除或隐藏,只是变灰)。
In a good news/bad news vein, I was able to disable the FaceTime button by clearing remoteHandle
(not removed or hidden, just grayed out).
但是,作为一个副作用,如果您没有设置 localizedCallerName $ c $,则调用者显示为未知 c>
CXCallUpdate
的属性。
没有句柄的调用会产生无法在最近按下的可压缩的副作用。
However, as a side effect, the Caller shows up as "Unknown", if you don't set the localizedCallerName
property of the CXCallUpdate
.
A call without a handle will have the side effect of not being pressable in Recents.
CXCallUpdate *callUpdate = [[CXCallUpdate alloc] init];
//callUpdate.remoteHandle = [[CXHandle alloc] initWithType:CXHandleTypeGeneric value:handle];
[self.provider reportNewIncomingCallWithUUID:uuid update:callUpdate completion:^(NSError* error) {}];
这篇关于在CallKit UI中隐藏FaceTime按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!