views:

113

answers:

2

Hi,

I want to bind my app to some file extension so when I receive an email with an attached file with the correct extension, clicking on it will launch my app and pass it the attached file. Is it possible ? How ? Thx

--G.

A: 

It's not possible to simply associate a file extension with an application on the iPhone.

You could create a custom URL scheme that would launch your app, but probably that won't help you.

James
+1  A: 

As iPhone applications are not allowed to share files on the file system, what you're looking for is not immediately possible (not with the published APIs that I know of, anyway). You might still have a couple of options though.

Either way you'll have to use a custom URL scheme, which is associated with your app, and paste that into your email. This URL might point to some external location, which your app can download the file from.

Or it might contain the actual file contents if it's fairly small. URLs are 'just text' (some restrictions apply), so you're free to put any data you want to in it, as long as it is URL-encoded.

You still need to get the URL into the email though, which might or might not be as easy as attaching a file.

roe
Thanks for your replies.I already investigated the URL scheme. I will try downloading the file from an external location, as it might be too big for the URL-encoded solution.Thx. --G.
Big Papoo