I try to open Uber app from my app. It redirects me straight to the appstore, not to the app. I would like it to open Uber app directly not via appstore app. Here is my function:
func callUrl(){
if let url = NSURL(string: "Uber://"), UIApplication.shared.canOpenURL(url as URL) {
UIApplication.shared.open(url as URL)
} else if let itunesUrl = NSURL(string: "https://apps.apple.com/us/app/uber/id368677368"), UIApplication.shared.canOpenURL(itunesUrl as URL) {
UIApplication.shared.open(itunesUrl as URL)
}
}