ios - 在 App 发布之前在 App Store 上评价我的 URL

标签 ios xcode swift url rate

我正在 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/

相关文章:

swift - 如果不需要多个实例,使用类型方法而不是实例方法是否更好

ios - SwiftUI 中月份的开始和结束日期

ios - BUTTON SHAPE on in device (iPhone) setting result app crash if its off app working

css - @font-face 嵌入 iOS 3.0 - 4.1

ios - 如何将 Objective C xcode 项目添加到另一个 swift 项目中

cocoa - 无法使用 Xcode 4 进行构建 - 所选运行目标对此操作无效

cocoa - 如何在 cocoa 应用程序中打包支持文件

ios - 快速保存和检索 UserDefaults 中的自定义对象

ios - 使用可选值解码嵌套 JSON Swift 4

ios - 在没有动画的情况下关闭 View Controller 后立即显示 View Controller