I am going through : Apple : DocInteration code and they have given a DirectoryWatcher.m which watches for directory changes in your app's Document Directory.
Whenever a user shares a file with Microsoft Outlook App the app will directly attach the file to a mail. Basically it is triggering an event when a file is getting copied to its Document Directory. I also want to trigger an event ( Not preview the document ) How do I do that ? He PDF Viewer Source Code has also done that and is triggering the app to open the PDF file copied in his custom viewer. But it only does when the app is in background and then it becomes active. I want to have the app ( even if terminated state ) to trigger an event when a file is shared with that app.