Could you guys help me to translate the following code into Swift?
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"itms://itunes.apple.com
For Swift 5 (tested code) to open App Store link
if let url = URL(string: "https://itunes.apple.com/in/app/your-appName/id123456?mt=8")
{
if #available(iOS 10.0, *) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
else {
if UIApplication.shared.canOpenURL(url as URL) {
UIApplication.shared.openURL(url as URL)
}
}
}