file Upload/Download using Objective-c

Discussion in 'iOS Programming' started by tskoti, Jan 6, 2009.

  1. tskoti macrumors newbie

    Nov 5, 2008
    Hi ,
    Plz post me a sample code to Download a file to iphone /applications/..etc when the Download button is Pressed on the screen

    Thanks in advance,
  2. drivefast macrumors regular

    Mar 13, 2008
    to download from an http server, you can use this to create an NSData object:
    + (id)dataWithContentsOfURL:(NSURL *)aURL
    it may in fact work as well with an ftp server. on upload, it greatly depends how your server is expecting the file to be delivered.
  3. tskoti thread starter macrumors newbie

    Nov 5, 2008
    how to create a file in Iphone

    Hi,please help me with a sample code to create a file in Iphone,and application have to read the content from that file....

    thanks in Advance,
  4. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    We'll probably need a better idea of what the purpose of this file is and what its contents are before we can start giving you suggestions.
  5. johnnybluejeans macrumors 6502

    Jan 16, 2006
    New York, NY
    There are examples of this all over the web. More importantly you can look at the Apple documentation for dataWithContentsOfURL and learn how it works, rather than just having someone write your program for you.

Share This Page