{"id":5455,"date":"2014-03-30T22:16:27","date_gmt":"2014-03-30T22:16:27","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ftp-url-with-space-in-objective-c-collection-of-common-programming-errors\/"},"modified":"2014-03-30T22:16:27","modified_gmt":"2014-03-30T22:16:27","slug":"ftp-url-with-space-in-objective-c-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ftp-url-with-space-in-objective-c-collection-of-common-programming-errors\/","title":{"rendered":"Ftp Url With space in Objective-c-Collection of common programming errors"},"content":{"rendered":"<p>Seems like your url object is not an NSString at runtime. Have you tried debugging this line ?<\/p>\n<p>here is a working sample code :<\/p>\n<pre><code>NSString *url = @\"ftp:\/\/192.168.1.20\/Lavori\/Andrea Baccin\/\";\nurl = [url stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];\nNSLog(@\"%@\",url);\n<\/code><\/pre>\n<p>The console shows :<\/p>\n<blockquote>\n<p>[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\/<\/p>\n<\/blockquote>\n<p>Hope this helps, Vincent<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 = @&#8221;ftp:\/\/192.168.1.20\/Lavori\/Andrea Baccin\/&#8221;; url = [url stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; NSLog(@&#8221;%@&#8221;,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<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5455","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5455"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5455\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}