2009-08-06 50 views

回答

0

这是一个关于允许应用程序共享其文件用iTunes文件夹的链接。 http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app

或者,您可以使用应用程序中的代码将文件直接写入应用程序“文档”目录。如果这两件事都不是你正在寻找的东西,你可以注册你的应用程序来支持文件格式?但是,这听起来不像你想要的。

- (NSString*)DocumentsPath 
{ 
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, TRUE); 
    return [paths objectAtIndex:0]; 
} 

//not every class supports writeToFile 
- (void)writeToFile:(id)object withFileName:(NSString*)filename 
{ 
    [object writeToFile:[[self DocumentsPath] stringByAppendingPathComponent:filename] atomically:TRUE]; 
} 
相关问题