The error comes from the fact that setDestination
expects a full path with a filename:
This is wrong:
[fileDl setDestination:@"/Users/ant/ebooks/" allowOverwrite:YES];
This is right:
[fileDl setDestination:@"/Users/ant/ebooks/file.epub" allowOverwrite:YES];
So the explanation is that probably you did something like I did: specify an existing folder where you intended to put the data.
PS: the dash before 3001 prevents Google from returning any results with the request: "NSURLErrorDomain error -3001", it is parsed as: "NSURLErrorDomain and error and not 3001"
..