Search code examples
iphoneswiftuber-api

I have add uber ride requset button in my ios app but location is not passing to uber app


I have implement UBER ride request button in my iPhone app. When I click on the button it takes me UBER app. but can not set the drop off location that I pass from my app.

Anyone have the demo link for it?


Solution

  • If I take look at the UBER documentation URL should be something like this:

    uber://?action=setPickup&pickup=pickup_location&dropoff=drop_location&client_id=<CLIENT_ID>
    

    I will suggest you use coordinates:

    uber://?client_id=<CLIENT_ID>&action=setPickup&pickup[latitude]=37.775818&pickup[longitude]=-122.418028&pickup[nickname]=UberHQ&dropoff[latitude]=37.802374&dropoff[longitude]=-122.405818
    

    For more just have a look at the Uber Documentation.