如题
现在业务要求是这样的 如果手机上有客户端 比如优酷 就直接跳转至优酷播放,如果没有 就直接跳转网页播放 跳转网页比较简单就是一个连接 但是跳转APP端的该如何跳转 求解答 谢谢
PHP中文网2017-04-17 17:40:57
You can use Url Scheme to jump to other apps. I have a note to check whether the third-party APP is installed and jump to start:
http://www.jianshu.com/p/28f517775214# 🎜🎜#
阿神2017-04-17 17:40:57
Use URL schema.
Check the interface of Youku to see if it provides a URL to quickly open the video player, such as youku://media?id=123, id=123 is the id of the video to be opened.
If provided, construct a similar URL and pass it to the openURL
method. The rest of the work is left to youku App.
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
return true
}