本文介绍了iOS上的Uber Deeplinking的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试生成一个深层链接,它将打开应用程序,将取件位置设置为当前位置,并将丢弃地址设置为Uber的总部。

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.

这就是我所拥有的:

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

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.

推荐答案

嘿,我遇到了同样的问题,这就是我开始工作的方式。首先,您需要将您的客户端ID添加到网址。所以在你的情况下改变

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

其中YOUR_CLIENT_ID是优步为您提供的客户ID。

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

要获得客户ID,您必须在Uber注册您的应用程序,地址为。

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

希望这会有所帮助!

这篇关于iOS上的Uber Deeplinking的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 19:45