Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7666659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:53:23+00:00 2026-05-31T14:53:23+00:00

I’m attempting to create an iOS 5 app with some very basic FTP functionality

  • 0

I’m attempting to create an iOS 5 app with some very basic FTP functionality and need some guidance. It will be connecting to a device on a local network and performing read/write actions with .dat/txt files. I’ve done some searching for the past few days and have seen various recommendations but nothing simple enough that I can pick up and quickly modify for my personal use.

My questions are these:

  1. Are there any tutorials/sample code that you could recommend to me?
  2. What frameworks and classes should I be working with for basic read/write operations?

Lastly, I should mention that I have given a considerable amount of time to analyzing the SimpleFTPSample from Apple but the sample code is giving “Connection Failure” and “Stream Open Error” notices for each example, so I’m a bit wary of its usefulness.

Forgive me if this has been answered elsewhere. All of the related posts have pieces of the answer I need, but not the whole thing. Thank you in advance!

EDIT for clarity: A well-defined example or step-by-step tutorial is what I would really like. My own Google searches have turned up nothing and I am desperately in need of some guidance here.

UPDATE:
I posted this question long ago but have continued using the FTPHelper mentioned in the accepted answer. I recently brushed the dust off the old project and realized there was a minor memory leak in FTPHelper’s fetch function that can be an app-killer if called repeatedly. If anybdy stumbles across this question and chooses to use FTPHelper, be sure to add the CFRelease line seen in the code below.

- (void) fetch: (NSString *) anItem
{
    if (!self.uname || !self.pword) COMPLAIN_AND_BAIL(@"Please set user name and password first");
    if (!self.urlString) COMPLAIN_AND_BAIL(@"Please set URL string first");

    NSString *ftpRequest = [NSString stringWithFormat:@"%@/%@", self.urlString, [anItem stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
/*  CFShow(ftpRequest); */
    NSString *writepath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
    self.filePath = [writepath stringByAppendingPathComponent:anItem];
    CFURLRef writeURL = CFURLCreateFromFileSystemRepresentation (NULL, (const UInt8 *) [writepath UTF8String], [writepath length], NO); 
    MySimpleDownload((CFStringRef)ftpRequest, writeURL, (CFStringRef) self.uname, (CFStringRef)self.pword);
    CFRelease(writeURL);//ADD THIS LINE TO FIX MEMORY LEAK 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:53:24+00:00Added an answer on May 31, 2026 at 2:53 pm

    The SimpleFTPSample app is running perfect, probably there is an issue that you can’t see. What I can recommend you (except Apple’s example) is to check THIS example which contains a helper class for all basic FTP operations. One thing to be aware of is iOS 5 ARC. Both Apple’s example and the one I linked are for older iOS versions.

    There are basically 2 ways to use them in iOS 5 – by telling the compiler to not use ARC by adding -fno-objc-arc flag in [Your project] -> TARGETS -> [Your app] -> Build Phases -> Compile Sources -> [Your file], or by using the built-in tool in Xcode for converting to ARC.

    I personally have tested only the first method and it works for me.

    If this does not help you I can write an example, but unfortunately today I am very busy.

    UPDATED:

    The basic mechanism is to use [FTPHelper list:THE_FTP_URL] to list the content of a folder, then create one list with the content and depending on the type (file or folder) download using [FTPHelper download: THE_FTP_URL_WITH_THE_FILENAME_FROM_LISTING]. From here you have to implement

    - (void) downloadFinished
    {
        //do the reading depending on the file type
        NSData *data = [NSData dataWithContentsOfFile:[FTPHelper sharedInstance].filePath];
    }
    

    The uploading is achieved in a similar way – using [FTPHelper upload:FILE_TO_UPLOAD] with a file from the filesystem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.