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

Discussion in 'iOS Programming' started by fenrus110, Mar 9, 2009.

  1. macrumors regular

    Joined:
    Mar 24, 2008
    #1
    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

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
  3. thread starter macrumors regular

    Joined:
    Mar 24, 2008
    #3
    that's what I thought. the file I created within the app, stays in the app right?
     
  4. macrumors 68000

    Joined:
    Feb 12, 2008
    Location:
    Illinois
    #4
    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

    Joined:
    Aug 23, 2008
    #5
    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

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #6
  7. thread starter macrumors regular

    Joined:
    Mar 24, 2008
    #7
    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

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #8
    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