Open Uber app from my app

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) {
         as URL)
              } else if let itunesUrl = NSURL(string: ""), UIApplication.shared.canOpenURL(itunesUrl as URL) {
         as URL)

And in else if statement:

  else if score == 26 {
        promilLabel.text = "Open app"

Ok, I got answer:

properly code is:
if let url = URL(string: “uber://”),
UIApplication.shared.canOpenURL(url) {
else { "")!)

Also it is necessary to add it in your info.plist:


Hi @pawelzet,

Good that you got the uber:// url, however it only opens the uber app, what if you want to do more? There is a document that provides more details.


This topic was automatically closed after 166 days. New replies are no longer allowed.