Yes Communication can be made between two applications in iPhone but limited to a handful of scenarios.
There might be apps which need to be sending to background according to some event like phonecall,etc.In Such cases you will have to configure your audio-session object (a Voip based app) and send notification accordingly.
The previous example is just interacting between apps with extremely less flexibility(sending app to background on some important built in event).The other way to do this is through URL Schemes , apple has some built in functionality and support for certain applications such as mail.tel , etc.But one of the application will come to foreground.
Like you can call a phone number , which is built in application using :-
NSString *phURL= [NSString stringWithFormat:@"tel:%@", [NSString StringWithString:@"1-800-555-1212"]];
NSURL *phoneURL = [NSURL URLWithString:phURL];
[[UIApplication sharedApplication] openURL:phoneURL]];
By the way it's along story if You need to implement a Custom URL Schemes..have fun with it.
- The other way is through UIDocumentInteractionController which provides in-app support to have interaction between certain files.(Sandbox environment inhibits a complete access or even accesses that can modify data of other application).Like it can be used to preview files in mail app or download attachments.But you cannot modify them for other application , of course you can copy it and modify it for your application.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…