error: writeToFile写入不成功/无法写入的原因
[cacheDic writeToFile:cacheURL atomically:YES];
后却返回no,查阅手册发现:
If an array or dictionary contains objects that are not property-list objects, then you cannot save and restore the hierarchy of data using the various property-list methods and functions.
分析:
- 也就说要存的不能为你自定义的对象,也不能是null
- 服务器返回数据中含有数个null
fix - BUG: OC暂时无法解决,在线解析数据
本文探讨了使用writeToFile方法时遇到的错误原因及解决方案。当数组或字典包含非属性列表对象时,会出现写入失败的问题。文章分析了具体原因,并提出了解决方案,即避免在数据中包含null值。
1620

被折叠的 条评论
为什么被折叠?



