Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shweta13

macrumors member
Original poster
Aug 7, 2008
38
0
Hi all,

I want to download and store an attachment opened through safari on my iphone. can I do it? If not is there any other way to download and save attachments on iphone?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
You mean from within an application you are writing? This forum is for questions regarding writing software for the iPhone...
 

shweta13

macrumors member
Original poster
Aug 7, 2008
38
0
You mean from within an application you are writing? This forum is for questions regarding writing software for the iPhone...

Yes,
I am opening safari thru my application...and I wish to download the attachment given on a particular URL and save it on my iphone...can i do it?
 

shweta13

macrumors member
Original poster
Aug 7, 2008
38
0
No. You will have to use the correct APIs to do it yourself. I'd suggest some reading. In particular you will want to use the NSURLConnection class.

I know about NSURLConnection..The thing is...I had read it somewhere that we cannot save the downloaded applications on iPhone...that is the reason I was asking...anyways thanks for the help
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
I know about NSURLConnection..The thing is...I had read it somewhere that we cannot save the downloaded applications on iPhone...that is the reason I was asking...anyways thanks for the help

You didn't say anything about applications. No you cannot download and run code (applications) directly or via Safari.
 

firewood

macrumors G3
Jul 29, 2003
8,141
1,384
Silicon Valley
I know about NSURLConnection..The thing is...I had read it somewhere that we cannot save the downloaded applications on iPhone...that is the reason I was asking...anyways thanks for the help

If the URL works, you can download and save most anything from an app. You can not run any applications however, downloaded or otherwise, except for maybe ones in plain javascript. Any applications you download will be stuck, unrunnable, inside a sandbox.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.