iPhone / iPad的。如何从Safari中的链接启动应用程序? [英] iPhone/iPad. How do I launch an app from link in Safari?

查看:511
本文介绍了iPhone / iPad的。如何从Safari中的链接启动应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我希望在点击时显式启动,或者在iPad或iPhone上运行的Safari中的网页上点击参数化的URL。

I have an app that I want to be launchable either explicitly when tapped or when a parameterized URL is clicked on on a webpage in Safari running on iPad or iPhone.

有人可以为我描绘方法和/或指向相关文档吗?非常感谢。

Can someone sketch the approach for me and/or point me to the relevant docs? Thanks so much.

干杯,

Doug

Cheers,
Doug

推荐答案

您基本上需要在Info.plist中注册自己的URL方案,您的应用程序才可以启动。如果您想在从URL启动时微调应用程序行为,您可以解析作为URL的一部分传递给您的应用程序的参数,并根据这些参数执行任何操作。

You basically need to register your own URL scheme in Info.plist, and your app becomes launchable. If you want to fine-tune the app behavior when launching from an URL, you can parse the parameters that are passed to your app as part of the URL, and do whatever you wish based on those.

这是关于同一主题的官方Apple指南。

这篇关于iPhone / iPad的。如何从Safari中的链接启动应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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