Uber Deeplinking on iOS

2019-02-22 02:22发布

问题:

I am trying to generate a deep link that will open the app, set pickup location to current location and dropoff address to Uber's HQ.

Here is what I have:

uber://?action=setPickup&pickup=my_location&dropoff[formatted_address]=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103

Unfortunately, no destination address is being pre-filled once in the app.

回答1:

Hey I was running into the same problem and this is the way I got it to work. First, you need to add your client id to the url. So in your case change

uber://?action=setPickup&pickup=my_location&dropoff[formatted_address]=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103

to

uber://?client_id=YOUR_CLIENT_ID&action=setPickup&pickup=my_location&dropoff[formatted_address]=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103

where YOUR_CLIENT_ID is the client id given to you by Uber.

To get a client id you must register your app with Uber at https://developer.uber.com/.

Hope this helps!



回答2:

The dropoff address will show appear once the user drops a pin to select their pickup location.