Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's the log from an iOS 5 phone:</p> <pre><code>2012-12-02 22:00:00.252 TestPhone[2297:707] didFinishLaunchingWithOptions: 2012-12-02 22:00:00.352 TestPhone[2297:707] applicationDidBecomeActive: 2012-12-02 22:00:06.708 TestPhone[2297:707] applicationWillResignActive: 2012-12-02 22:00:10.582 TestPhone[2297:1c03] Call start 2012-12-02 22:00:11.016 TestPhone[2297:707] applicationDidBecomeActive: 2012-12-02 22:00:12.536 TestPhone[2297:707] applicationWillResignActive: 2012-12-02 22:00:12.564 TestPhone[2297:707] applicationDidEnterBackground: 2012-12-02 22:00:36.543 TestPhone[2297:707] applicationWillEnterForeground: 2012-12-02 22:00:36.769 TestPhone[2297:707] applicationDidBecomeActive: 2012-12-02 22:00:36.840 TestPhone[2297:2e07] Call has been disconnected 2012-12-02 22:00:36.854 TestPhone[2297:707] applicationWillResignActive: 2012-12-02 22:00:49.885 TestPhone[2297:707] applicationDidBecomeActive: </code></pre> <p>and here's the log from an iOS 6 phone:</p> <pre><code>2012-12-03 06:27:55.401 TestPhone[7734:907] didFinishLaunchingWithOptions: 2012-12-03 06:27:55.462 TestPhone[7734:907] applicationDidBecomeActive: 2012-12-03 06:28:01.396 TestPhone[7734:907] applicationWillResignActive: 2012-12-03 06:28:04.345 TestPhone[7734:907] applicationDidBecomeActive: 2012-12-03 06:28:04.401 TestPhone[7734:1803] Call start 2012-12-03 06:28:05.824 TestPhone[7734:907] applicationWillResignActive: 2012-12-03 06:28:05.826 TestPhone[7734:907] applicationDidEnterBackground: 2012-12-03 06:28:17.318 TestPhone[7734:907] applicationWillEnterForeground: 2012-12-03 06:28:17.329 TestPhone[7734:907] applicationDidBecomeActive: </code></pre> <p>The "disconnected" message has just disappeared. (This isn't an answer, it's an observation.) </p> <p>Here's the code I used. I I created a single-view application in xcode with a single button in the xib, and this is the whole of my UIViewController:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; self.callCenter = [[CTCallCenter alloc] init]; self.callCenter.callEventHandler = ^(CTCall* myCall) { NSString *call = myCall.callState; if ([call isEqualToString:CTCallStateDisconnected]) NSLog(@"Call has been disconnected"); else if([call isEqualToString:CTCallStateDialing]) NSLog(@"Call start"); else if ([call isEqualToString:CTCallStateConnected]) NSLog(@"Call has just been connected"); else if([call isEqualToString:CTCallStateIncoming]) NSLog(@"Call is incoming"); else NSLog(@"None"); }; } - (IBAction)callButtonPressed:(id)sender { NSString *number = @"tel:01234567890"; UIWebView *callWebview = [[UIWebView alloc] init]; callWebview.frame = self.view.frame; [self.view addSubview:callWebview]; NSURL *telURL = [NSURL URLWithString:number]; [callWebview loadRequest:[NSURLRequest requestWithURL:telURL]]; } @end </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload