我正在 xcode 6.1 - Swift 中实现评分功能。
我正在关注 this教程,我的问题是如何在发布应用程序之前在应用程序商店中找到它的 URL,即是否有我们预先添加应用程序名称的默认 URL?
使用 AlertController 显示评分选项
var alert = UIAlertController(title: "Rate Me", message: "Thanks for using Lab Cases- Ver 1 Newbrn and Obstetric Haematology", preferredStyle: UIAlertControllerStyle.Alert) alert.addAction(UIAlertAction(title: "Rate Lab Cases", style: UIAlertActionStyle.Default, handler: { alertAction in UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=<iTUNES CONNECT APP ID>")!) alert.dismissViewControllerAnimated(true, completion: nil) })) alert.addAction(UIAlertAction(title: "No Thanks", style: UIAlertActionStyle.Default, handler: { alertAction in NSUserDefaults.standardUserDefaults().setBool(true, forKey: "neverRate") alert.dismissViewControllerAnimated(true, completion: nil) })) alert.addAction(UIAlertAction(title: "Maybe Later", style: UIAlertActionStyle.Default, handler: { alertAction in alert.dismissViewControllerAnimated(true, completion: nil) })) self.presentViewController(alert, animated: true, completion: nil)
并且对 URL 的调用在这里 -
UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=<iTUNES CONNECT APP ID>")!)
alert.dismissViewControllerAnimated(true, completion: nil)
提前致谢 C
最佳答案
您可以从https://itunesconnect.apple.com 获取URL
使用您的 apple id 登录,转到“我的应用程序”部分,选择应用程序(或创建新应用程序)
在子菜单上,有更多/在 App Store 上查看。
这是实际应用的链接
关于ios - 在 App 发布之前在 App Store 上评价我的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30447089/