Could you guys help me to translate the following code into Swift?
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"itms://itunes.apple.com
For me didn't worked one of this answers. (Swift 4) The app always opened the iTunes Store not the AppStore.
I had to change the url to "http://appstore.com/%Appname%" as described at this apple Q&A: https://developer.apple.com/library/archive/qa/qa1633/_index.html
for example like this
private let APPSTORE_URL = "https://appstore.com/keynote"
UIApplication.shared.openURL(URL(string: self.APPSTORE_URL)!)
(remove spaces from the app-name)