aflx/pg_downloader_plugin_ios — Issue #4: 404
Author: javray
Created: 2011-12-08 19:18:05+00:00
State: open

Hello Alex,

I've discovered some bug when you try to download inexistent URL. The problem is in the method dataWithContentsOfURL which return NULL if the URL doesn´t exists.

I think you have to check this before doing nothing.

I've changed your code like this:

if (data == NULL) {
results = [NSArray arrayWithObjects: callbackId, @"404", nil];
[self performSelectorOnMainThread:@selector(downloadFail:) withObject:results waitUntilDone:YES];
}
else {

@try
....
}

Hope this help you.