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
ios iphone core-telephony


source to share


No one has answered this question yet

Check out similar questions:

6
"isReachable" is incorrect when sending message from watch app to iOS app
five
IOS Phone Call Detection with CTCallCenter (Swift)
2
FaceBook Connect. Login to the system
2
iOS 8.1 Only displaying UITextView intermittently
0
Changing views keeps giving me an attempt to represent vc1 to vc whose view is not in the window hierarchy
0
NSOutputStream does not call NSStreamEventHasSpaceAvailable delegate
0
Why can't I remove my annotations from the mapview?
0
Receiving Google iOS user email
0
IPhone FBConnectDialog drawer disappears
0
The specific expression in the if condition causes a 7 second delay in execution



All Articles
Loading...
X
Show
Funny
Dev
Pics