bobzsj87
bobzsj87

Reputation: 818

How to get the fileURL when an ACTIVE app is opened from other apps

I have already implemented DocumentTypes in the info.plist, and the applicationDidFinishedLaunchingWithOptions just works fine, because I can get the fileURL from the option dictionary.

My question is: when I opened my app and send it to background, and open other apps such as Safari and "Open in" a file, my app become active and is there anyway to get the fileURL from anyplace? I found that applicationDidBecomeActive has no userInfo.

Upvotes: 1

Views: 71

Answers (1)

Jesse Rusak
Jesse Rusak

Reputation: 57168

You need to override application:handleOpenURL: or application:openURL:sourceApplication:annotation: in your UIApplicationDelegate to get this information.

Upvotes: 1

Related Questions