English 中文(简体)
利用国际会计师联合会的另一份申请提交的进口档案
原标题:Import file from another application using UIDocumentInteractionController

我想开发一个SOS应用程序,在那里,我想要通过使用<条码>停止行动文件<<<<> >,把任何PDF/Doc/XLS文件放在我的邮件/Safari,最后将其上载到我的当地服务器上。

我能够把我的台式图像文件上载到我的当地服务器上。

但是,我的问题是,能够使用<条码> 概念文件 InteractionController,在我的申请中查找PDF/Doc/XLS文档(载于Safari/mail申请)。 安装;将其上载到我的当地服务器?

问题回答

确实有可能从另一个申请中进口一个文件,如果是一纸空档机,则使用国际交易日志管理人。 你们都需要做的是无益的。 您的申请清单需要添加支持的文件格式。 增 编 DidFinshWithLaunchingOptions sent methods to You app in application delegation category in the following manner.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [self applicationDidFinishLaunching:application];

    if (launchOptions && [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey])
    {
        NSString* path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];

        NSURL *url=[launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
        NSString *sourceFilePath=[url path];        
        NSFileManager *fileManager=[NSFileManager defaultManager];
        NSData *fileData=[fileManager contentsAtPath:sourceFilePath];
        NSString *fileName = [NSString stringWithFormat:@"test.pdf"];
        NSString *updatedFilePath = [path stringByAppendingPathComponent:fileName];

        BOOL hasWrittenSuccessfully = [fileData writeToFile:updatedFilePath atomically:TRUE];   
    }

    return YES;
}

You can t fetch documents, you can tell iOS that your app can open PDF/Doc/XLS. Do this by adding supported filetype to you info.plist: http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签