如何在ios应用程序中打开app store?

时间:2017-10-06 01:57:39

标签: ios swift

我正在使用此代码为ios应用程序评分应用程序。

let appLink = "https://itunes.apple.com/us/app/[name of the app]/id[idnumber]?mt=8"
let url = URL(string: appLink)
UIApplication.shared.openURL(url!)

问题是Safari说“页面地址无效”

有什么方法可以让它发挥作用吗?我正在使用xcode 9和swift 4

2 个答案:

答案 0 :(得分:7)

您的网址可以是:

@IBOutlet

更好的是,使用https://itunes.apple.com/app/id<App ID Here>?mt=8 ,这样您就可以在App Store页面中显示该应用,而无需离开您的应用。

从iOS 10.3开始,您可以SKStoreProductViewController专门允许用户发布评论或为应用评分。

答案 1 :(得分:-1)

根据此处的新指南和文档,使用 STORE KIT 请求审核。

https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview

在旧版本上,您可以使用

itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=<AppId>&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software
相关问题