ios simulator crash
Opened this issue · 1 comments
caozhiyong1983n commented
- (void)setObject:(NSString *)obj forKey:(NSString *)key persistent:(BOOL)persistent callback:(WXModuleCallback)callback {
NSString *filePath = [WXStorageModule filePathForKey:key];
if (obj.length <= WXStorageLineLimit) {
if ([WXStorageNullValue isEqualToString:self.memory[key]]) {
[[WXUtility globalCache] removeObjectForKey:key];
[[NSFileManager defaultManager] removeItemAtPath:filePath error:nil];
}
self.memory[key] = obj;
NSDictionary *dict = [self.memory copy];
[self write:dict toFilePath:[WXStorageModule filePath]];
[self setInfo:@{@"persistent":@(persistent),@"size":@(obj.length)} ForKey:key];
[self updateIndexForKey:key];
[self checkStorageLimit];
callback(@{@"result":@"success"});
return;
}
when I run it in ios simulator,crash,callback is null.
liangjun-jiang commented
had similar issue when run the project as it. I have done those steps to fix this crash.
- change podfile to; Basically, I want to have the latest WeexSDK
def common
pod 'WeexSDK'
pod 'SDWebImage', '3.7.5'
pod 'SocketRocket', '0.4.2'
end
-
Delete WeexSDK folder
-
Clean & build & run. You should be good to go.