Could you guys help me to translate the following code into Swift?
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"itms://itunes.apple.com
Swift 5
let url = "your app url" if #available(iOS 10.0, *) { UIApplication.shared.open(url, options: [:], completionHandler: nil) } else { // Earlier versions if UIApplication.shared.canOpenURL(url as URL) { UIApplication.shared.openURL(url as URL) } }