0

In my app, I open up a youtube video like such:

 NSURL *youtubeURL = [NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];

[[UIApplication sharedApplication] openURL:youtubeURL];

When I do this and I have the youtube app installed, it will open up youtube, but not load the video. It will just go to the youtube homepage. But if I do it again, it will load video.

I have trouble reproducing the problem, but has anyone seen this? It usually happens after not using the youtube app for a while.

evenodd
  • 2,026
  • 4
  • 26
  • 38
  • What are the values of 'sharedApplication' and 'url'? – Ashwin Iyengar Jul 24 '13 at 20:57
  • url is a a youtube video url. Checking on sharedApplication – evenodd Jul 24 '13 at 21:04
  • sharedAppliaiton is just http://developer.apple.com/library/ios/DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/clm/UIApplication/sharedApplication – evenodd Jul 24 '13 at 21:07
  • Where are u calling this? Is it after you click on a button? – Yan Jul 24 '13 at 21:46
  • yes, in a method called by a button – evenodd Jul 24 '13 at 21:49
  • If you try different youtube links do you see the same issue? Is this video is allowed to be played on mobile device. I think i seen this issue clicking on the link from messages. The link just took me to the youtube homepage in the youtube app – Yan Jul 24 '13 at 22:02
  • I can't reproduce the problem, but it has happened many times. I can't figure out what causes it! – evenodd Jul 26 '13 at 14:51

0 Answers0