更多技術性文章請關注 合伙呀
自己是程序員,干嘛不自己寫代碼完成?下載工具還不一定管用!具體解決方案如下:
1,獲得內容
NSArray *dictionary = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"DiseaseListData" ofType:@"plist"]];
2,保存文件格式和路徑
NSString *documents = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).lastObject;
NSString *filePath = [documents stringByAppendingString:@"/lala.txt"];
3,把內容保存到txt文件
[dictionary writeToFile:filePath atomically:YES];
NSLog(@"%@",[NSBundle mainBundle].resourcePath);