通話の終了時に通話ステータスを取得する必要がありますが、行のように常に false を返すようにイベントが呼び出されません
[callCenter setCallEventHandler: ^(CTCall* コール)
ここに私のコードがあります
CTCallCenter *callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler=^(CTCall* call)
{
if(call.callState == CTCallStateDialing)
{
//The call state, before connection is established, when the user initiates the call.
NSLog(@"Call is dailing");
}
if(call.callState == CTCallStateIncoming)
{
//The call state, before connection is established, when a call is incoming but not yet answered by the user.
NSLog(@"Call is Coming");
}
if(call.callState == CTCallStateConnected)
{
//The call state when the call is fully established for all parties involved.
NSLog(@"Call Connected");
}
if(call.callState == CTCallStateDisconnected)
{
//The call state Ended.
NSLog(@"Call Ended");
}
};
どんな助けでも大いに感謝します