tags:

views:

144

answers:

7

I need a way to transfer a bunch of information (1-10kb) from an email in the Mail application to my iPhone app.

I was thinking I could craft a custom URL in the body of the email that, when clicked, would transfer the information through a custom URL handler to my app.

However, it's a lot of data. Can I pass that much data in the custom URL handler? e.g. myapp://load?var1=[lotsofdata]&var2=[lotsofdata]

Or, is there some better way I can transfer info from the Mail app to my app?

+2  A: 

I don't know what the maximum length is, but I do know that you can have very long data-urls in Safari, which let you store image or other file data in the url itself. If the limits are similar, then you are in luck.

Daniel Worthington
+1  A: 

What happens when you try it? :-)

Jane Sales
A: 

The usual limit for a GET should not be longer than 2083 characters to be on the safe side. But also it should be a method to read the email directly from your own app, but I'm not very familiar with this solution.

Bogdan Constantinescu
A: 

Did you try this? I'm curious how it turned out.

A: 

Instead of a link in the email, you could probably just create a form that posts the information instead of sending a get request to your site; that would get around your length limitation (if there is one)

John
A: 

That last answer assumes you have a site to put the data on. If you're trying to keep things purely in email it would be nice to stick the data in the mail message. You can embed images in an email anyway, so why not?

A form in the email; not a web page
John
A: 

Doing some research, I came across two blog posts that claim to have created large URLs that have worked, although one is using the data: URL scheme and the other is using mailto: .

Your best bet is to probably just try it out: Create a link using myapp:// with a large amount of data, stick it in an email and see if your app reads the entire thing.

Martin Gordon