Hello,
Im having toruble with opening uber app from my app. I try to open app, when score is = 26. It goes directly to itunesUrl link, so it opens appstore with uber app instead of app directly. Maybe you’ll have any ideas how to deal with it. Here is my code:
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)
}
}
And in else if statement:
else if score == 26 {
promilLabel.text = "Open app"
self.callUrl()