我在xcode 6.1中实现了一个rate me函数--Swift。
我正在关注this教程,我的问题是如何在应用商店发布之前找到我的应用商店的网址,即是否有默认网址,我们先添加应用名称? / p>
使用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)
提前致谢 ç
答案 0 :(得分:5)
您可以从https://itunesconnect.apple.com
获取网址使用您的Apple ID登录,转到我的应用程序部分,选择应用程序(或创建新的)
在子菜单上,App Store上有更多/ View。
这是实际应用
的链接