Can an iPhone App create and send + receive and read a CSV file as an ATTACHMENT?

Discussion in 'iOS Programming' started by RottenApple2, Jul 17, 2010.

  1. macrumors newbie

    Joined:
    Nov 4, 2009
    #1
    I'd like to introduce a feature in my iPhone App that allows the following:
    1) creating and sending by email a CSV file from within my iPhone App.
    2) importing into my iPhone App a CSV file created with 3rd party software and sent to me by email.

    These are the questions:
    1a) Is it possible to actually create a CSV file from within the App and send it as an attachment? I know I can send an email containing all the strings required, but I want to be able to send the actual file.
    1b) Once created, can this file be stored into the memory allocated to my iPhone App?
    2) What procedure should I follow to import a CSV file into my App? I do not want to read the CSV file from a URL.
    Can all this be done with the iPhone or not??

    Thanks!
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    1a) Yes: you can write any sort of file you like to your applications sandboxed area of the filesystem. You can the use the Message UI API to attach this to an email.

    1b) By memory do you really mean memory? Or space on the filesystem (which is never referred to as memory by a programmer)?

    2) You can register for filetypes your app can open in iOS 4.

    The documentation is there for a reason: use it. It answers your questions.
     

Share This Page