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

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

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-01-03
  • 2021-12-05
  • 2022-01-02
相关资源
相似解决方案