iPhone自定义URL方案向主屏幕添加快捷方式 [英] iPhone custom url scheme Add shortcut to homescreen

查看:332
本文介绍了iPhone自定义URL方案向主屏幕添加快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了此网站 http://cubiq.org/add-to-home-screen 具有用于显示气泡以鼓励Safari中的用户创建网页快捷方式的JavaScript,但我想知道是否有人可以在创建之前用本机应用程序自定义网址方案交换网页网址快捷方式.

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.

推荐答案

在某些情况下,使用一些快捷方式从具有不同参数的自定义URL启动应用程序可能会有所帮助.例如,如果您有一个应用程序,它是一些小应用程序的容器.因此,直接启动此类小应用程序之一.如果没有菜单,则可以使用带有应用名称作为参数的自定义URL.

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. 此链接解释了如何使用自定义的url快捷方式,使用准备好的特殊html文件将其从Safari中保存.此方法依赖于刷新到自定义URL的html页面,并且需要Internet连接.副作用-从快捷方式启动应用程序时,您很快会看到Safari在应用程序启动之前打开html页面.

  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.

此链接说明了如何使用iPhone配置实用程序执行此操作.此方法需要在设备上安装配置配置文件.我看到的这种方法的副作用是-从快捷方式启动应用程序后,您会在后台看到两个应用程序-您的应用程序和Web剪辑(快捷方式).

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).

这篇关于iPhone自定义URL方案向主屏幕添加快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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