我这样写是为了接受其他应用程序导出的文件。
-(BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
if (url != nil && [url isFileURL])
{
NSData *myData = [NSData dataWithContentsOfURL:url];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docPath = [paths objectAtIndex:0];
NSString *filePath = [docPath stringByAppendingPathComponent:[self.arrayGetSplit objectAtIndex:counting] ];
[myData writeToFile:filePath atomically:YES];
}
return YES;
}
但是我只能保存1个文件。如果用户导出多个文件,如何支持多个文件?