在App Published之前对App Store中的URL进行评分

dan*_*ush 2 url xcode rate ios swift

我正在xcode 6.1中实现一个rate me函数 - Swift.

我正在关注教程,我的问题是如何在应用程序商店发布之前找到我的应用程序的URL,即是否有一个默认URL我们先添加应用程序名称?

  • 使用AlertController显示rate me选项

    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)
    
    Run Code Online (Sandbox Code Playgroud)

对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)
Run Code Online (Sandbox Code Playgroud)

在此先感谢C.

vic*_*fan 5

您可以从https://itunesconnect.apple.com获取网址

用你的苹果ID登录,转到我的应用程序部分,选择应用程序(或创建新应用程序)

在子菜单上,有更多/在App Store上查看.

这是实际应用程序的链接