今天 User 要求要做 “幫我們打個分數吧” 的功能
這應該只是在 click 後 打開 appStore 來 打分數
查了一下 open url 的方式
https://developer.apple.com/library/ios/qa/qa1629/_index.html
// Objective-C NSString *iTunesLink = @“itms://itunes.apple.com/us/app/apple-store/id375380948?mt=8"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]]; // Swift UIApplication.sharedApplication().openURL(NSURL(string: "itms://itunes.apple.com/us/app/tai-gu-ying-shou-fen-xi/id986799180?mt=8")!)
Url Format
itms-apps://itunes.apple.com/app/idAPP_ID
ex:
itms-apps://itunes.apple.com/app/id986799180
取得iTunes url 的方式
1.Launch iTunes on your computer.
2.Search for the item you want to link to.
3.Right-click or control-click on the item's name in iTunes, then choose "Copy iTunes Store URL" from the pop-up menu.
4.In your application, create an NSURL object with the copied iTunes URL, then pass this object to UIApplication' s openURL: method to open your item in the App Store.
參考︰
http://stackoverflow.com/questions/433907/how-to-link-to-apps-on-the-app-store
留言
張貼留言