file Upload/Download using Objective-c

Discussion in 'iPhone/iPad Programming' started by tskoti, Jan 6, 2009.

  1. macrumors newbie

    Joined:
    Nov 5, 2008
    #1
    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,
    tskoti@yahoo.com
     
  2. macrumors regular

    Joined:
    Mar 13, 2008
    #2
    to download from an http server, you can use this to create an NSData object:
    Code:
    + (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. thread starter macrumors newbie

    Joined:
    Nov 5, 2008
    #3
    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,
    koti
     
  4. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    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. macrumors 6502

    Joined:
    Jan 16, 2006
    Location:
    New York, NY
    #5
    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