UIDocumentInteractionController
is your friend.
Basically it works like this:
- App 1 registers as being able to handle files of type XYZ
- App 2 implements
UIDocumentInteractionController
and will give users the options to "send the file to App1" (I believe this has to be user activated)
- App 1 implements
-(BOOL)application:openURL:sourceApplication:annotation:
and deals with the transferred file which will be saved in your Documents/Inbox
directory. From there you can copy the file elsewhere and then manipulated it, making sure you clean up by getting rid of the original one saved on the Inbox folder.
Class reference available here
Document interaction programming guide available here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…