Skip to content

Crash when connection was lost #5

Open
@Allui

Description

@Allui
#pragma mark - Downloading the APPINFO JSON FILE
-(void)downloadAppInfoFile{
    NSError *error;
    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:stringDBAppInfoURL] options:NSDataReadingUncached error:&error];
    if(error)
    {
        NSLog(@"AppUpadterNotifier - Error while downloading the app info -----%@",error);
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [self downloadAppInfoFile];
        });
    }
    [self parseJSONDataIntoDictinory:data];
}

The method [self parseJSONDataIntoDictinory:data]; invokes crash because data is nil when connections is lost

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions