# Open Uber app from my app

**URL:** <https://forums.kodeco.com/t/open-uber-app-from-my-app/104215>\
**Category:** Swift\
**Created:** [April 6, 2020, 10:12am UTC](https://forums.kodeco.com/t/open-uber-app-from-my-app/104215 "2020-04-06T10:12:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pawelzet](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pawelzet/32/97809_2.png) [@pawelzet](https://forums.kodeco.com/u/pawelzet)\
**Post date:** [April 6, 2020, 10:12am UTC](https://forums.kodeco.com/t/open-uber-app-from-my-app/104215/1 "2020-04-06T10:12:41Z")

</div>

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()

```

---

<div class="post-metadata">

**Author:** ![pawelzet](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pawelzet/32/97809_2.png) [@pawelzet](https://forums.kodeco.com/u/pawelzet)\
**Post date:** [April 7, 2020, 6:54pm UTC](https://forums.kodeco.com/t/open-uber-app-from-my-app/104215/2 "2020-04-07T18:54:24Z")

</div>

Ok, I got answer:

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

```
    UIApplication.shared.open(url)
}
else {
    UIApplication.shared.open(URL(string: "https://apps.apple.com/us/app/uber/id368677368")!)
}

```

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

```
<key>LSApplicationQueriesSchemes</key>
<array>
<string>uber</string>
</array>

```

---

<div class="post-metadata">

**Author:** ![jayantvarma](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jayantvarma/32/111768_2.png) [@jayantvarma](https://forums.kodeco.com/u/jayantvarma)\
**Post date:** [May 2, 2020, 5:28am UTC](https://forums.kodeco.com/t/open-uber-app-from-my-app/104215/3 "2020-05-02T05:28:02Z")

</div>

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.

> **[Developers | Uber](https://developer.uber.com/docs/riders/ride-requests/tutorials/deep-links/introduction)**
>
> Discover how the Uber API can easily enhance your app’s user experience and take your innovation further with a wide range of new capabilities.

cheers,

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [September 20, 2020, 2:12am UTC](https://forums.kodeco.com/t/open-uber-app-from-my-app/104215/4 "2020-09-20T02:12:41Z")

</div>

Closed on September 20, 2020, 2:12am UTC

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