Q:

Opening emailed file in app running in background

My opens and edit a custom file type. I allow the user to open a downloaded file in my application, typically through email. However the file isn't passed to the application if the program is alreay running.
So if you don't have your app running you can use 
 didFinishLaunchingWithOptions

How ever if your app is already running it doesn't actually hit this method when the file is passed to your application. What is the method that does this for app going from the background to foreground? 

A:

If I understand the question correctly (and without looking at the title, which is not very descriptive) you should have a look at the UIApplicationDelegate methods applicationDidBecomeActive: and applicationWillEnterForeground: .
These methods don't get the document passed to them. Instead, after applicationWillEnterForeground: is called, the system will call application:openURL:sourceApplication:annotation: . In your implementation of this method you can retrieve the document.

