把服务器返回数据写入沙盒,在沙盒中找不到代码如下:
[responseObject writeToFile:path atomically:YES];
然后查了下返回值,发现写入数据失败。
BOOL success = [responseObject writeToFile:path atomically:YES];
返回值为NO
查阅文档结果:returns NO if all the objects are not property list objects, since the resultant file would not be a valid property list.
说明如果要存储的对象中如果包含有非属性列表对象(plist对象),就会存储失败。
pli