ios - CTCallCenter callEventHandler is never called -
i try use ctcallcenter receive incoming call iphone. while application active call device , nothing happens calleventhandler not invoked.
what can reason?
i use ios9.0 beta3 installed on iphone 5 , 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 been connected"); [self showmessage:@"call has been connected"]; } else if(call.callstate == ctcallstateincoming) { nslog(@"call incoming"); [self showmessage:@"call incoming"]; } else { nslog(@"none of conditions"); [self showmessage:@"none of conditions"]; } }; }
Comments
Post a Comment