Deep link into eBay iOS app with custom URL scheme?

廉价感情. 提交于 2019-12-11 02:39:43

问题


In my app, I’d like a way to open the eBay application on a customer’s iOS device (if they have that app installed), and perform a search with a term I specify.

I’ve noticed that opening an eBay:// URL does indeed open the app, but I can’t find any API documentation on eBay’s developer portal discussing what I’d like to do.

Has anyone done this? Any idea what the rest of the URL would need to be in order to simply perform a search in the app with a given term, and perhaps some specified search parameters such as category or country?

I’ve tried ebay://www.ebay.com/sch/i.html?_nkw=test, it launches the app but does not perform any search.


回答1:


I see you probably found this link, which from your experience seems deprecated by the latest eBay mobile app for iOS release

Wikipedia page on mobile app deep linking

I wrote directly to the dev team, they maintain a public facing discussion forum here:

eBay iOS App Discussion Forum

They confirmed that examples in the wiki link above are still supported. I tested and verified it as working myself today. It's working fine at the time of this answer. Note all you can do on iOS is land on a particular items page, or launch a search within the app. An example of searching for a particular eBay item ID would be: eBay://launch?itm=360703170135 for iOS.




回答2:


This works for me using the eBay custom URL scheme:

let eBayURL:NSURL?=NSURL(string: "ebay://launch?itm=301858203427")
UIApplication.sharedApplication().openURL(eBayURL!)


来源:https://stackoverflow.com/questions/31222583/deep-link-into-ebay-ios-app-with-custom-url-scheme

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!