To open a special user's profile to YouTube, IOSube: // user / myusername but that's for work Did not know.
After the text "itemprop =" text ">
YouTube page in the YouTube app (if installed on this device to open) you can check the device Whether or not the page can open:
YouTube application for NSString // URL scheme * youtubeURL = "@YouTube: //www.youtube.com/user"; // Page name (or channel name) NSString * youtubePageName = @ "YourPageName"; // Check whether the device can open in Youtube app if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: [youtubeURL stringByAppendingString: youtubePageName]]]) // Open in UT applications [UIApplication sharedApplication] openURL: [NSURL URLWithString: [youtubeURL stringByAppendingString: youtubePageName]]]; } Else {// If the device can not open in the YouTube app, open the page in the browser. [[UIApplication shared application] Opal: [NSL URL URL string: @ "http://www.youtube.com/user/YourPageName"]]; } This solution worked for me
Edit iOS 9: In the Info.plist under the URL scheme of the target app, LSApplicationQueriesSchemes Should be added. Here is a related post:
No comments:
Post a Comment