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

fenrus110

macrumors regular
Original poster
Mar 24, 2008
142
0
Here is what I want to do
1) create a simple text file on the iPhone. such as saving some text from a UITextView

2) export or drag and drop that file onto the hard drive of my computer for viewing. Kinda like how they do the WebDav, wireless USB type things.

The main issue I'm pondering is if I can create a file and have it accessible. I know there sandbox limits and stuff.

I've done something smiliar by uploading my text to a server and having the server send the user an email with a text file the server generated. But my client wants to do it purely iPhone -> computer
 

fenrus110

macrumors regular
Original poster
Mar 24, 2008
142
0
that's what I thought. the file I created within the app, stays in the app right?
 

Niiro13

macrumors 68000
Feb 12, 2008
1,719
0
Illinois
Actually, I think both are possible as long as you save to the correct location.

While I am currently a developer, I haven't worked with the WebDAV thing so I don't know it's full capabilities, but I know you can save files to the Documents Directory. Adn since that's the only directory with local read/write, I figured that's where the applications like Air Sharing or DataCase point to.
 

CocoaPuffs

macrumors 68020
Aug 23, 2008
2,005
3
Actually, I think both are possible as long as you save to the correct location.

While I am currently a developer, I haven't worked with the WebDAV thing so I don't know it's full capabilities, but I know you can save files to the Documents Directory. Adn since that's the only directory with local read/write, I figured that's where the applications like Air Sharing or DataCase point to.
Not quite, each app is in its own sandbox, so it doesn't matter where you save it, you won't be able to export the file, other than through the web using XML of sort.
 

fenrus110

macrumors regular
Original poster
Mar 24, 2008
142
0
You can do 2 - sort of. You need to have your app run some sort of server. HTTP servers are probably best so you can get to the file using a web browser.

You may find this useful

http://deusty.blogspot.com/search/label/HTTP Server

I looked at this briefly. While I am hardly an expert on networking I think the problem is the same. The file is created externally from the iPhone, so it does not have the restrictions. I'm trying to create the file within the iPhone before exporting it, which creates the problem with sandboxing...
 

caveman_uk

Guest
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
If you run a server on the iPhone then you can download files from it just like you can any other webserver. The sandboxing doesn't come into it at all - so long as the server is running in the same app that created the file on the iPhone. They can't be separate.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.