tralves/weex-todo-list

ios simulator crash

Opened this issue · 1 comments

  • (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.

had similar issue when run the project as it. I have done those steps to fix this crash.

  1. 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

  1. Delete WeexSDK folder

  2. Clean & build & run. You should be good to go.