将NSMutableArray的内容写入iOS 8.3中的文本文件

时间:2015-06-25 11:53:20

标签: ios objective-c nsmutablearray

我引用了以下链接,但它无法在iOS 8.3 iPod中运行

Write contents of array to a text file

is it possible to save NSMutableArray or NSDictionary data as file in iOS?

NSString *file_path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingPathComponent:@"/app_name/untitled.txt"];
[myArr writeToFile:file_path atomically:YES];

我正在尝试在文本文件中编写NSMutableArray。此代码不适用于iOS 8.3,其中NSMutableArray具有NSMutableDictionary内容。

0 个答案:

没有答案