On Dec 4, 2009, at 8:39 PM, Leone Anthony wrote:
> Warren --
>
> Please someone jump if I get something wrong here ... but ...
>
> A Cocoa touch application can not really feed data to another
> application on it's own. All of the applications on an iPhone/iPod
> touch are sandboxed and can not communicate to another application
> on the phone/ipod. This is not really a problem for the application
> you are describing because, one can include map views in your
> application and make use of the included map data for location.
Yeah, one application can handle both map display and a deliveries
database. No need to have separate apps.
In the case where you really must have separate apps, you could hack
some kind of data exchange using custom URLs. An iPhone app can
register to handle a custom URL scheme (e.g. bonjovi://). If
application X opens a URL of bonjovi://blah/blah?oh, and application Y
is registered to handle the bonjovi:// scheme, then application Y will
launch and process that URL. You can load up the URL with arbitrary
data, so the URL would be your data transfer channel.
One limitation of this approach: you can only pass data to another
application by launching tha app via URL. You're limited to what
would be reasonable UI behavior. If two apps are continuously
launching each other, passing data back and forth with custom URLs,
that would get to be annoying pretty quickly. Also probably would
make it through the gauntlet of App Store review. You have to keep
the data exchange down to something that would fit a reasonable
workflow between the user, application X, and application Y.
Another limitation: without defining a whole protocol on top of the
custom URL, you will be limited to passing arbitrary data as part of
the URL proper. There are encoding specs for URLs and I think there
might be a length restriction (1024 characters?). That said,
there's nothing keeping a developer from creating a custom URL (e.g.
bonjovi://) and treating it as identical to the HTTP protocol. As
long as you don't mind writing the code, there's nothing keeping you
from defining GET, PUT, POST, DELETE requests (identical to HTTP) on
top of your custom protocol. Then you'd get all the power of HTTP
with respect to data passing in your custom protocol, with the price
being that you'd have to write code to process the bonjovi:// requests
and responses in the same way that HTTP is processed.
Bill