CNLiveServiceHistorySearch.m
926 Bytes
//
// CNLiveServiceHistorySearch.m
// CNLiveNetAdd
//
// Created by CNLive-zxw on 2020/7/15.
// Copyright © 2020 cnlive. All rights reserved.
//
#import "CNLiveServiceHistorySearch.h"
@implementation CNLiveServiceHistorySearch
+ (void)saveHistorySearch:(NSMutableArray *)data {
NSString *Path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString *filePath = [Path stringByAppendingPathComponent:@"ServiceHistorySearch.data"];
[NSKeyedArchiver archiveRootObject:data toFile:filePath];
}
+ (NSMutableArray *)readHistorySearch {
NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString *filePath = [path stringByAppendingPathComponent:@"ServiceHistorySearch.data"];
//解档
NSMutableArray *data = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath];
return data;
}
@end