iPhone 文件扩展名应用程序关联 [英] iPhone file extension app association

查看:38
本文介绍了iPhone 文件扩展名应用程序关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 iPhone 上,我正在运行一个名为 Caissa Chess 的应用程序.在向制造商注册应用程序后(这是可选的),我收到了一封电子邮件,其中包含一个国际象棋谜题.邮件消息的关键部分,显示了一个国际象棋图,如下所示:

On my iPhone, I'm running an app called Caissa Chess. After registering the app with the manufacturer (this is optional) I received an email, containing a chess puzzle. The crucial part of the mail message, showing a chess diagram looks like this:

<a href="chess://puzzle/8/p1R3p1/4p1kn/3p3N/3Pr2P/6P1/PP3K2/8 w ?term=w2&solution=c7xg7&description=Amura%20vs%20Carlos%20Bulcourf%2C%20Villa%20Ballester%2C%201996"><img src="cid:image1"></a>

点击此 URL 显示的图表退出 Mail.app 并打开 Caissa Chess,然后显示图表,并让您解决难题.

Tapping the diagram displayed by this URL quits Mail.app and opens Caissa Chess, that then displays the diagram, and allows you to solve the puzzle.

这是如何工作的?我想为 iPhone 制作一个小应用程序,它需要一个通过电子邮件发送的外部文件.我将首先需要了解发生了什么.

How does this work?I want to make a little app for the iPhone, that will need an external file, sent by email. I will fist need to understand what's going on.

  • chess:// 如何以及在哪里定义将打开什么应用程序?
  • 网址的其余部分是什么意思?它是指本地文件,还是应用程序将其解析为实时 http: url?电子邮件正文包含图像附件.
  • chess:// how and where is defined what application will be opened?
  • what does the rest of the URL mean? Would it be referring to a local file, or will it be resolved by the app as a live http: url? The email message body contains an image attachment.

我确信在某处记录了这种机制,但是我所拥有的书籍没有描述它,Google 也没有帮助我.

I'm sure that this mechanism is documented somewhere, but the books I have don't describe it, and Google didn't help me either.

提前致谢

Sjakelien

推荐答案

您必须在您的应用中注册协议.我之前看过一些教程,包括这个.

You have to register the protocol in your app. I've seen a few tutorials before, including this one.

http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

这篇关于iPhone 文件扩展名应用程序关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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