Search code examples
iphoneobjective-cipadsqlitemfmailcomposer

How to share all the data i have stored using sqlite database between two devices to reuse the data by dumping in another device


I have implemented an app in iPhone, (Objective-c)

in that i have used SQLITE for data base.

Now i need to share the data.

Share Data:

  1. I need to send data trough mail.
  2. In that i attach my data base file (may be in csv format?)
  3. To re use my data in other's application by dump the data..

Any useful replies, thanks in advance


Solution

  • You might have seen some apps open the pdf files from the mail box, because those apps registers themselves to handle the .pdf files. So iOS shows he list of available apps who registered to open the pdf files, so that user can select any one of the app to view the attached file.

    Similarly you can create your own file extension and register in the info.plist file, so that in the mail when tap on the attachment it provides an option to open in your application.

    Raywenderlich has given a very good tutorial for this.

    How To Import and Export App Data Via Email in your iOS App

    Have a look at it, will surly help you.