更多技术性文章请关注 合伙呀

自己是程序员,干嘛不自己写代码完成?下载工具还不一定管用!具体解决方案如下:

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);