PDA

View Full Version : file Upload/Download using Objective-c




tskoti
Jan 6, 2009, 12:45 PM
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



drivefast
Jan 6, 2009, 05:56 PM
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.

tskoti
Feb 12, 2009, 03:09 PM
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.

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

dejo
Feb 12, 2009, 03:19 PM
Hi,please help me with a sample code to create a file in Iphone,and application have to read the content from that file....
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.

johnnybluejeans
Feb 12, 2009, 04:32 PM
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

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.