Ftp Url With space in Objective-c-Collection of common programming errors

Seems like your url object is not an NSString at runtime. Have you tried debugging this line ?

here is a working sample code :

NSString *url = @"ftp://192.168.1.20/Lavori/Andrea Baccin/";
url = [url stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
NSLog(@"%@",url);

The console shows :

[Session started at 2011-02-02 14:23:48 +0100.] 2011-02-02 14:23:51.515 UISpec[669:207] ftp://192.168.1.20/Lavori/Andrea%20Baccin/

Hope this helps, Vincent