How does a receiver receive a call in Sinch?
<p>I'm looking through the code, specifically the Main View Controller that initiates calls with the call button. Both users must be on this View Controller after inputting their names to be found in a database. </p>

<p>But I'm confused as to how the callee is notified of a call and <strong><em>how it segues into a Calling View Controller that shows that they can answer or hangup.</em></strong> </p>

<p>I know that prepareForSegue sets the call to be whoever called, but I'm still confused with the remaining few lines after that.</p>

<p>So note the last two delegate methods: the first delegate method performs a segue, which makes sense. But what about the second one because I'm confused as to how it segues into call view controller that lets the callee answer or decline.</p>

<p><strong>MainViewController.m</strong></p>

<pre><code>#import "MainViewController.h"
#import "CallViewController.h"

#import &lt;Sinch/Sinch.h&gt;

@interface MainViewController () &lt;SINCallClientDelegate&gt;
@end

@implementation MainViewController

- (id&lt;SINClient&gt;)client {
  return [(AppDelegate *)[[UIApplication sharedApplication] delegate] client];
}

- (void)awakeFromNib {
  self.client.callClient.delegate = self;
}

- (IBAction)call:(id)sender {
  if ([self.destination.text length] &gt; 0 &amp;&amp; [self.client isStarted]) {
    id&lt;SINCall&gt; call = [self.client.callClient callUserWithId:self.destination.text];
    [self performSegueWithIdentifier:@"callView" sender:call];

  }
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  CallViewController *callViewController = [segue destinationViewController];
  callViewController.call = sender;
}

#pragma mark - SINCallClientDelegate
// Outgoing Call?
- (void)client:(id&lt;SINCallClient&gt;)client didReceiveIncomingCall:(id&lt;SINCall&gt;)call {

  [self performSegueWithIdentifier:@"callView" sender:call];
}
// Incoming Call?
- (SINLocalNotification *)client:(id&lt;SINClient&gt;)client localNotificationForIncomingCall:(id&lt;SINCall&gt;)call {
  SINLocalNotification *notification = [[SINLocalNotification alloc] init];
  notification.alertAction = @"Answer";
  notification.alertBody = [NSString stringWithFormat:@"Incoming call from %@", [call remoteUserId]];
  return notification;
}
</code></pre>