Our app relies on UIWebview to return to the app following a phone call initiated by the user. After consulting a number of developers, we did not make any changes for iOS6, expecting the app to work fine.
Now, the following has happened:
1) UIWebview IS still working - bringing the user back into the app when they end a call
2) However, the app is directing the user to the wrong screen - it is taking it to the screen FOLLOWING the one the user should see. The crucial screen where the user can log their phone call is not showing up.
3) The only exception seems to be when the user logs out and logs back in - in this case they can see the correct screen ONLY once, and then the next time they call they go to the wrong screen again.
I am not a coder but after looking through the code as it stands, it looks like this is one of three (nearly identical) snippets of code that should be calling the End Call screen at the end of a phone call but under iOS6 is not:
- (IBAction)onCall:(id)sender
{
DashCaller *caller = [[DashCaller alloc] init];
NSString *callNumber = _phone.number;
if (!callNumber)
{
callNumber = @"No Phone number";
}
else if (callNumber.length == 0)
{
callNumber = @"No Phone number";
}
else
{
callNumber = [callNumber stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
}
DashDelegate.calledPhone = _phone;
DashDelegate.callLogVC.delegate = _viewController;
DashDelegate.callStartDate = [NSDate date];
NSUserDefaults *setting = [NSUserDefaults standardUserDefaults];
NSNumber *blockNumber = [setting valueForKey:BLOCK_NUMBER];
NSURL *url = nil;
if (blockNumber.boolValue)
url = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@%@", kStringBlockNumber, callNumber]];
else {
url = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", callNumber]];
}
[caller callTelURL:url];
}
Specifically, the line "DashDelegate.callLogVC.delegate = _viewController;" seems like it should be calling the CallLogVC view but instead it is going to the screen that should appear right after that view.
Anyone with thoughts on what to change (that could have been affected by iOS6)? The app is fully functional in iOS5. And, why might the app show this page only once after a log-out-log-in and then stop showing it?