tags:

views:

88

answers:

3

Hello guys I want to use "Custom URL Scheme" to transfer data from application to other application in iPhone. Can I ask: How big data can we transfer from app to app?

Thank you!

+2  A: 

I know one upper bound is 2^32 - 1 bytes, because that's the maximum length of a NSString on the iPhone, and NSURL can be converted to NSStrings. But that may not be the lowest upper bound.

Matthew Flaschen
+3  A: 

Apple URL Scheme Usage: yourSchemeName://stringurl.........

Apple application need use - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url to handle url data. So I think your question may be equal to the maximum length of a URL.

Safari (Browser) At least 80,000 characters will work. I stopped testing after 80,000 characters.

http://www.boutell.com/newfaq/misc/urllength.html

flycomputer
A big URL size is required for the canvas components, I guess :) If you right-click one of them and go to View Image, check out the URL -- the entire image is encoded in there as base 64!
Chris Dennett
A: 

Your data size won't be limited if you use UIPasteboard instead. This article details how to store your app's data into a named pasteboard, then pass the name of the pasteboard to another app using a custom URL scheme:

http://www.zacwhite.com/blog/2009/10/15/getting-user-data-from-a-lite-to-a-paid-app/

Tom