【问题标题】:Rate Me URL on app store before App Published应用发布前在应用商店给我评分
【发布时间】:2023-03-19 16:00:01
【问题描述】:

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

【问题讨论】:

  • Appirater 是您自己实现此功能的绝佳选择,它有许多本地化版本。
  • 谢谢,那是 obj c 吗?
  • 是的,它在 Objective-C 中。您可以使用Bridging Header 导入它。或者,如果您想扩展您的 func,这将是一个很好的参考。

标签: ios xcode swift url rate


【解决方案1】:

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

用你的apple id登录,进入我的应用部分,选择应用(或新建)

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

这是实际应用的链接

【讨论】:

  • 谢谢,所以我得到了 url 虽然应用程序显然没有找到,因为还没有上传,调试时我在浏览器中得到一个无效的地址,我猜这可以作为应用程序商店还没有?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-10-20
  • 2016-09-20
  • 2021-07-25
相关资源
最近更新 更多