CTCallCenter callEventHandler is never called
I am trying to use CTCallCenter to receive an incoming call from an iPhone. While the app is active, I call the device and nothing happens. CallEventHandler is not called.
What could be the reason?
I am using IOS9.0 beta3 installed on iPhone 5 and XCode7.
My code:
- (void)viewDidLoad {
[super viewDidLoad];
CTCallCenter *callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler = ^(CTCall* call)
{
if (call.callState == CTCallStateDisconnected)
{
NSLog(@"Call has been disconnected");
[self ShowMessage:@"Call has been disconnected"];
}
else if (call.callState == CTCallStateConnected)
{
NSLog(@"Call has just been connected");
[self ShowMessage:@"Call has just been connected"];
}
else if(call.callState == CTCallStateIncoming)
{
NSLog(@"Call is incoming");
[self ShowMessage:@"Call is incoming"];
}
else
{
NSLog(@"None of the conditions");
[self ShowMessage:@"None of the conditions"];
}
};
}
+3
user3110705
source
to share
No one has answered this question yet
Check out similar questions:
6
five
2
2
0
0
0
0
0
0