add custom URL Schema using http://

2020-04-19 07:59发布

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.

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.

标签: iphone
2条回答
我命由我不由天
2楼-- · 2020-04-19 08:53

This does not work for third-party apps. Only Apple's own apps can react to certain http:// links.

查看更多
\"骚年 ilove
3楼-- · 2020-04-19 08:56

You have to run the link through your site first.

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

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

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

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.

查看更多
登录 后发表回答