swift跳转到Appstore

//进入appstore中指定的应用

        let str = NSString(format: "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa /wa/viewContentsUserReviews?type=Purple+Software&id=%d", "myAppID")

        UIApplication.shared.canOpenURL(NSURL(string: str as String) as! URL)

//进入首页

        let str = NSString(format: "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@", "myAppID")

        UIApplication.shared.canOpenURL(NSURL(string: str as String) as! URL)

posted @ 2017-01-06 15:44  蓝天下的田埂上  阅读(1226)  评论(0编辑  收藏  举报