iPhone custom url scheme Add shortcut to homescree

2019-07-31 02:39发布

I have found this site http://cubiq.org/add-to-home-screen which has javascript for showing a bubble to encourage the user in Safari to create a shortcut to the web page, but I was wondering if anyone has a way to swap the web page url with the native app custom url scheme before creating the shortcut.

1条回答
We Are One
2楼-- · 2019-07-31 02:48

In some situations it can be helpful to have a few shortcuts to start an app from a custom URL with different parameters. For example if you have an application that is a container for a few little applications. So, to start one of such little apps directly. without a menu you can use a custom URL with the app name as a parameter.

I spent some time trying to find the solutions. I found to ways:

  1. This link explains how to make a custom url shortcut saving it from Safari using a special html file prepared. This method relies on the html page refresh to a custom URL, and requires an internet connection. A side effect - when you start the app from a shortcut you shortly see Safari opening the html page before your app starts.

  2. And this link explains how to do that with the iPhone Configuration Utility. This approach requires an installation of configuration profile on you device. A side effect of this method what I see is - after you start your application from a shortcut you see two applications in the background - your app, and the Web clip (the shortcut).

查看更多
登录 后发表回答