xcode 如何通过 Safari URL 启动我的 iPhone 应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9200226/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 23:16:09  来源:igfitidea点击:

How to launch my iPhone app via Safari URL

iphoneobjective-ciosxcodesafari

提问by neowinston

Possible Duplicate:
Supporting Open In… menu item in my app for iOS Mail And Safari

可能的重复:
支持在我的 iOS 邮件和 Safari 应用程序中打开...菜单项

I'm working on an application that will download files from the Internet, for further use.

我正在开发一个可以从 Internet 下载文件以供进一步使用的应用程序。

How do I launch my own app when a link is pressed on Safari?

在 Safari 上按下链接时如何启动我自己的应用程序?

For example, when a .pdf file link is shown in safari the user clicks it and the file is downloaded. After that there is the suggestion to "Open in", followed by a list of possible applications, like iBooks. I want my app to be displayed among these options.

例如,当 .pdf 文件链接显示在 safari 中时,用户单击它并下载文件。之后是“打开方式”的建议,然后是可能的应用程序列表,例如 iBooks。我希望我的应用程序显示在这些选项中。

采纳答案by koregan

You want to look into associating the PDF file type with your app.

您想研究将 PDF 文件类型与您的应用程序相关联。

The answers to How do I associate file types with an iPhone application?pretty much covers it.

对这些问题的答案我怎样关联的文件类型与iPhone应用程序?几乎涵盖了它。

回答by beryllium

If you just want to open your app then see Custom URL Scheme.

如果您只想打开您的应用程序,请参阅自定义 URL 方案

But associating file type to your iPhone applications is different than custom URL scheme. This threadgreatly describe it

但是将文件类型关联到您的 iPhone 应用程序与自定义 URL 方案不同。这个线程很好地描述了它