Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 6.1 UIWebview crashes when clicked on play youtube video inside a webpage

Tags:

iphone

ios6

ipad

I am trying to show a website inside app. The website which i am trying to load has got a youtube video in it. The website loads properly in UIWebView and also lists the youtube video. But when I click on youtube video, the app crashes.

Crash log just says:

setting movie path: http://r19---sn-aig7knl7.c.youtube.com/videoplayback?...............

The website when loaded in Safari works fine, it even plays youtube video full screen.

Please help me in fixing this issue.

11 Feb 2013 - UPDATE

The issue is observed only on iOS Simulator 6.1. On Device everything works fine.

Detailed Info:

I have a custom UIViewController(TestWebViewController) which has an instance of UIWebView and implements UIWebViewDelegate. I have added a UIViewController in Storyboard and added UIWebView inside it, linked this UIViewController to my custom TestWebViewController and linked IBOutlet and delegate for UIWebView.

On Clicking a button, I am programmatically instantiating TestWebViewController using

TestWebViewController *testWebVC = [self.storyboard instantiateViewControllerWithIdentifier:@"testWebVC"];
testWebVC.view.frame = self.view.frame;
[testWebVC loadWebViewWithUrl:TEST_URL];

[self presentViewController:testWebVC animated:YES completion:nil];
like image 449
Sushma Satish Avatar asked Feb 07 '13 17:02

Sushma Satish


1 Answers

As scott said in his comment, I removed my breakpoint for all exceptions and my error went away.

Hope this will help to others.

like image 148
Wali Haider Avatar answered Oct 18 '22 11:10

Wali Haider