How detect incoming and outgoing call end state? iphone

ios picture ios · Mar 13, 2012 · Viewed 7.5k times · Source

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.

How disappear app after installation?

How detect incoming and outgoing call?

How display screen after ending of incoming and outgoing call?

The main thing is that i am making this for personal not of app store. So please if you have any idea about then give full suggestion and ideas.

Thanks in advance...

Answer

Raj Subbiah picture Raj Subbiah · Mar 13, 2012

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];