0
当我查找如何将PFObject
写入磁盘时,发现了一些相当复杂的东西。 我发现的最简单的选择是编写编码和解码功能,然后使用NSKeyedArchiver
(我还没有尝试,因为我想确保我使用的是最适合的解决方案)。 更复杂的选项涉及第三方库,以便与Core Data同步。将PFObject写入磁盘
Parse.com的工程师表示他们正在研究的功能将使offline usage work better,但没有任何尚未AFAIK。
然而,PFUser
类有一个currentUser
方法在下面的描述和签名:
/*!
Gets the currently logged in user from disk and returns an instance of it.
@result Returns a PFUser that is the currently logged in user. If there is none, returns nil.
*/
+ (instancetype)currentUser;
看来,无论是在这种方法应该与磁盘上的PFObject
工作的好办法。 有什么方法可以知道这种方法背后的技术(以及在所有必须发生保存的方法背后)?