2009-08-06 55 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]; 
} 
相關問題