tags:

views:

50

answers:

3

Hi , is there any way to connect between 2 applications ? for example i create dictionary database for weDict application , and is it possible move the database from my app to weDict app folder ?

+4  A: 

I don't think that is possible the way you put it. You would have to create a service and store the info in a centralized location.

This is because every app is bound to it's on "sandbox" folder.

Mikeware
yeah i think so !
Momeks
+1  A: 

This seems like it would not be allowed by Apple because if one application can modify the data of another then, for example, it could write bad data which leaves that other application in a "broken" state.

Justin Ethier
A: 

Implement a server in one app and a client in the other (utilize TCP, s/b able to use localhost). Connect the client to the server, transfer the data, instantiate the DB, fini.

KevinDTimm
You sure this is possible on the iPhone? The new multitasking allows apps to preserve their state while another app is running, but I didn't think they could take any action.
jasongetsdown
I was only half correct, there are a number of options for working in the background, but none seem like they would allow you to run an app as a server.http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html
jasongetsdown
If they only preserve state, then it's not possible. But, that's not really multitasking is it? I can save state now, this won't be much of a benefit. I will have to check how far said 'multitasking' goes.
KevinDTimm
"Be prepared to handle connection failures in your network-based sockets." This appears to be the most important line - although they do say that VOID will continue to work (it's a specific flag to set). Since nobody can know which ports a VOIP is using, network communications must be able to continue in the background. In the end, I'm not sure if this is possible or not. It seems as if Apple have said YES and NO at the same time.
KevinDTimm