How detect incoming and outgoing call end state? iphone

后端 未结 1 575
[愿得一人]
[愿得一人] 2021-01-06 05:57

I have a requirement that is the app should disappear after install and when incoming or outgoing call, soon after the call the app should prompt and display the screen.

相关标签:
1条回答
  • 2021-01-06 06:28

    Use following notification to find the call status.Add CoreTelephony.framework

    #import <CoreTelephony/CTCall.h>
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callReceived:) name:CTCallStateIncoming object:nil];
       [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callEnded:) name:CTCallStateDisconnected object:nil];
       [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callConnected:) name:CTCallStateConnected object:nil];
    
    0 讨论(0)
提交回复
热议问题