iPhone, call another phone number in response to the first not answering?

后端 未结 5 1397
生来不讨喜
生来不讨喜 2021-02-02 11:51

I am attempting to create an application that will initiate a call to a priority 1 contact on a call-center-like list.

Then, if that contact does not answer (let\'s forg

5条回答
  •  一个人的身影
    2021-02-02 12:10

    #pragma mark -
    #pragma mark Call Handler Notification
    -(void)notificationCallHandler {
    
    [[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];
    
    }
    -(void)callEnded:(NSNotification*)notification {
         NSLog(@"callEnded");
    
    }
    
    -(void)callReceived:(NSNotification*)notification {
         NSLog(@"callReceived");
    }
    -(void)callConnected:(NSNotification*)notification {
         NSLog(@"callConnected");
    }
    

    May this will help you

提交回复
热议问题