0
votes

I implemented association with files in my app that works pretty great but I still have ine problem that i cannot fugire out.

im my

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

I have this code. it doesn't work when the app become active from background.

NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];

any suggestion how can i make this work ?

Thanks.

2

2 Answers

1
votes

This method:

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

is only called when you app just launched. Coming back from background is not launching your app.

You may find these two methods useful.

- (void)applicationWillEnterForeground:(UIApplication *)application {
- (void)applicationDidBecomeActive:(UIApplication *)application {
0
votes

You need to also hook with applicationDidBecomeActive: when the app became active from multitasking.