title: Upload file to ftp - iOS
body: <p>I use <a href="http://developer.apple.com/library/ios/#samplecode/SimpleFTPSample/Introduction/Intro.html" rel="nofollow">SimpleFTPSample</a> to upload files, but i have problem with line:</p>
  
  <pre><code>ftpStream = CFWriteStreamCreateWithFTPURL(NULL, (__bridge CFURLRef) urlOfHost);
          assert(ftpStream != NULL);
  </code></pre>
  
  <p>It always NULL, i dont know why? hostUrl is OK but nothing happen to ftpStream and i get the assert.</p>
  
  <p>URL:</p>
  
  <pre><code>urlOfHost = [[AppDelegate sharedAppDelegate] smartURLForString:[NSString stringWithFormat: @"ftp://wd150.1host.co.il/%@", orderKey]];
  
      success = (urlOfHost != nil);
  
      if (success) {
          // Add the last part of the file name to the end of the URL to form the final 
          // URL that we're going to put to.
  
          urlOfHost = CFBridgingRelease(CFURLCreateCopyAppendingPathComponent(NULL, (__bridge CFURLRef) url, (__bridge CFStringRef) [filePath lastPathComponent], false)
                                   );
          NSLog (@"%@", [urlOfHost description]);
          success = (urlOfHost != nil);
      }
  </code></pre>
  
  <p>Can someone know?</p>
  
  <p>Thank's from advance.</p>