gpt4 book ai didi

ios - CallKit - 最近通话中的通话记录不显示拨出电话的名称

转载 作者:行者123 更新时间:2023-12-01 18:41:57 27 4
gpt4 key购买 nike

我在 VOIP 应用程序中使用 CallKit。一切正常,除了在拨出电话后的最近通话列表中,它只显示号码,即使号码保存在电话簿中。
例如,电话簿中有一个名为“John”的联系人。现在,如果从应用程序拨出电话,在最近的日志中它只显示号码。这就是我所做的。

NSUUID *callUUID = [NSUUID UUID];
CXHandle *handle = [[CXHandle alloc] initWithType:CXHandleTypePhoneNumber value:number];
CXStartCallAction *action = [[CXStartCallAction alloc] initWithCallUUID:callUUID handle:handle];
action.contactIdentifier = identifier; //identifier of that contact
[self.callController requestTransaction:[CXTransaction transactionWithActions:@[action]] completion:completion];

最佳答案

问题是你在拨出电话时没有告诉提供者名字,你可以在中添加它来解决。 performStartCallAction 下一个代码:

CXCallUpdate *update = [[CXCallUpdate alloc] init];
[update setRemoteHandle:[[CXHandle alloc] initWithType:CXHandleTypePhoneNumber value:number]];
[update setLocalizedCallerName:name];

[provider reportCallWithUUID:uuid updated:update];

使用此代码,我解决了同样的问题,现在它显示了名称。

关于ios - CallKit - 最近通话中的通话记录不显示拨出电话的名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41545389/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com