I have used CFBundleDocumentTypes and ask system to trigger my app when I touch the email attachment file.
It worked and my app worked as expected. But how can my app get the attachment file handle to process开发者_运维技巧?
Welcome any comment
I did the same task a few weeks ago. You have to do it like this:
NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];
if ([url isFileURL]) {
//Do wahtever you want to do with the attached file...
}
Use this code snippet in the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
Method.
I hope this helps you.
Sandro Meier
精彩评论