What am I doing wrong?
I don't get any error but I don't see anything happening either...
I'm trying to figure out when the user is dialing so i can see what number they are dialing..
I want my app to be activated when a certain number is dialed...
i put this code in my DidResignActive (even tried it it didEnterBackground)
I don't get any error but I don't see anything happening either...
I'm trying to figure out when the user is dialing so i can see what number they are dialing..
I want my app to be activated when a certain number is dialed...
i put this code in my DidResignActive (even tried it it didEnterBackground)
callCenter = [[CTCallCenter alloc] init]; [callCenter setCallEventHandler:^(CTCall *call) { NSDictionary *dict = [NSDictionary dictionaryWithObject:call.callState forKey:@"callState
; [[NSNotificationCenter defaultCenter] postNotificationName"CTCallStateDidChange" object:nil userInfo:dict]; NSLog(@"state changed on call: %@", call); [[NSNotificationCenter defaultCenter] addObserver:self selectorselector(callReceived name:CTCallStateIncoming object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selectorselector(callEnded name:CTCallStateDisconnected object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selectorselector(callConnected name:CTCallStateConnected object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selectorselector(callDial name:CTCallStateDialing object:nil]; }];"]