你们中的任何人都知道如何将 json 数据调用保存到文件中吗?
self.results=[NSJSONSerialization
JSONObjectWithData:jsonData
options:0
error:&error];
我试过了:
[_results writeToFile:@"jsonFile" atomically:YES];
但我没有看到文件:
NSArray * directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:directory error:&error];
file path (
"Default-568h@2x.png",
"Default.png",
"Default@2x.png",
"en.lproj",
"Info.plist",
"JSON Generator",
PkgInfo
)
你们中的任何人都知道我在做什么错吗?
我会非常感谢你的帮助