好的,看看这里,最终使用PFFile(解析本地数据存储)保存在PFObject上吗?。可以肯定的是,如果您在PFFile上调用save,它将保存到在线数据存储中。因此,您应该使用PFFile.save()。我认为最好的选择是将文件保存在某个文件夹中。在本地并将该路径保存在PFObject中。解析文档只是这样说
"Pinning a PFObject is recursive, just like saving, so any objects that are pointed to by the one you are pinning will also be pinned. When an object is pinned, every time you update it by fetching or saving new data, the copy in the local datastore will be updated automatically. You don't need to worry about it at all."
它在主PFObject中的其他对象上递归调用.pin()。但是,如果您查看PFFile
API文档,则它没有.pin(),这意味着它不支持将PFFile保存到本地数据存储中。所以我想说您应该将它们保存在某个目录中,并将路径保存在PFObject中。
更新资料
save:Saves the file synchronously and sets an error if it occurs.- (BOOL)save:(NSError **)errorParameterserrorPointer to an NSError that will be set if necessary.Return ValueReturns whether the save succeeded.



