#极致框架是什么#任何自定义数据模型一句话搞定归解档自动化
2021-05-06 本文已影响0人
fredericoyang
极致框架是什么
//TODO: Archive and save models save to a file
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:mArray requiringSecureCoding:YES error:&error];
//TODO: Read and unarchive models just from a file
NSData *data = [NSData dataWithContentsOfFile:filePath options:NSDataReadingMappedIfSafe error:&error];