How to share all the data i have stored using sqli

2020-05-03 11:21发布

问题:

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

回答1:

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.



回答2:

You may also want to consider breaking up your problem into two parts: 1) exporting to CSV, and then 2) sending your CSV via email. Here's a link to help with part 1: Use CHCSVParser: https://github.com/davedelong/CHCSVParser