开发者

How do I back up my App's data through email?

开发者 https://www.devze.com 2023-02-23 19:11 出处:网络
I want to allow people using my app to email themselves a backup copy of all the data stored开发者_如何学Go in the app.

I want to allow people using my app to email themselves a backup copy of all the data stored开发者_如何学Go in the app.

Is it possible to email the .sqlite to an email address from in the app? I have the email side of things working but am unsure how to go about using

[controller addAttachmentData:imageData mimeType:@"image/jpg" fileName:@"RobotWithPencil.jpg"]; to attach the .sqlite file.

Also, once I have done this, what is a good way of getting the .sqlite file back into the app?


See this tutorial on Ray Wenderlich's site for help exporting data.

As for as the MIME Type goes, this site suggests octet/application-stream. (Kudos to Google on both counts.)

Of course, there is the MFMailComposer documentation if you need any clarification on that end.

0

精彩评论

暂无评论...
验证码 换一张
取 消