Is it possible to create a file on the iPhone and export it onto a computer's disk?

Discussion in 'iPhone/iPad Programming' started by fenrus110, Mar 9, 2009.

  1. macrumors regular

    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
  2. Moderator


    Staff Member

    1 - Possible.
    2 - Not possible.
  3. macrumors regular

    that's what I thought. the file I created within the app, stays in the app right?
  4. macrumors 68000

    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.
  5. macrumors 68010

    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.
  6. Guest


  7. macrumors regular

    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...
  8. Guest


    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.

Share This Page