How to open app store in ios app?

I use this code to evaluate an app from an ios app.

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!)

the problem is that Safari says "Invalid page address"

Is there any way to make it work? I am using xcode 9 and swift 4

+4
source share
2 answers

Your URL may simply be:

https://itunes.apple.com/app/id<App ID Here>?mt=8

Better yet, use SKStoreProductViewControllerit so that you can show the application on the app store page without having to leave your application.

And with iOS 10.3, you can SKStoreReviewControllerspecifically allow the user to post a review or rate the app.

+4
source

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
-1

Source: https://habr.com/ru/post/1686998/


All Articles