使用http://添加自定义URL架构 [英] add custom URL Schema using http://

查看:96
本文介绍了使用http://添加自定义URL架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的iPhone应用程序中添加自定义URL,以便其他应用程序可以打开它,
但是我希望URL以http开头,更多细节,我想打开应用程序在我发送给用户的电子邮件中形成一个链接,该链接必须是有效的,如果从台式计算机读取该电子邮件,他将被重定向到该网站。

I want to add a custom URL to my iPhone app so other apps will be able to open it, However I want the URL to begin with "http", in more details, I want to open the app form a link in an email i've sent to the user and the link has to be valid that if the email is read from a desktop computer he will be redirected to the site.

我知道有些应用程序可以像youtube一样对 http://www.youtube.com <做出反应/ a>

I know that there are apps that do so -like youtube that reacts to http://www.youtube.com

但是我不确定第三方应用程序是否可以

However I'm not sure whether Third party app can

谢谢,
盖伊。

Thanks, Guy.

推荐答案

您必须先通过您的网站运行该链接。

You have to run the link through your site first.

例如,电子邮件中的链接可以是 http://< YOUR_SITE> / Q9xDH364

For example, the link in the email could be http://<YOUR_SITE>/Q9xDH364

此链接可以将他们带到您网站上的特殊页面。在您的网站上,如果您从iPad / iPhone / iPod中检测到用户代理,则可以显示类似以下内容的警告:

And this link could take them to a special page on your site. On your site, if you detect the user agent from an iPad/iPhone/iPod, you can display an alert that says something like:


如果您的设备上安装了我的应用程序,您可以在应用程序中查看此链接

If you have "MY APP" installed on your device, you can view this link in your app

然后,如果用户按下确定,将 http://< YOUR_SITE> / Q9xDH364 链接转换为您的应用可以获得的链接,例如 my_app://< YOUR_SITE> ; / Q9xDH364

Then, if the user presses ok, translate the http://<YOUR_SITE>/Q9xDH364 link into a link your app can get, such as my_app://<YOUR_SITE>/Q9xDH364

这适用于我的应用,氛围。例如,从iPhone和浏览器转到 http://snd.am/35 并查看差异。

This works well for my app, Ambiance. For an example, go to http://snd.am/35 from your iPhone and your browser and see the differences.

这篇关于使用http://添加自定义URL架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆