Kodeco Forums

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

An email tutorial showing you how you can import and export your app's data via email in your iOS app.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3109-email-tutorial-for-ios-how-to-import-and-export-app-data-via-email-in-your-ios-app

My iOS programming experience is in Swift and I don’t want to learn Objective C.

How about updating this tutorial to Swift.

Hello Ray,

Could you please provide an answer to the my previous question WRT upgrading “How To Import and Export App Data Via Email
” to Swift.

I have also downloaded the finished tutorial with the aim of converting it myself, however, when I attempt to run it on my iPhone 6 I get the following error:

2016-03-11 11:54:56.220 ScaryBugs[2205:1446403] Loading bugs from /var/mobile/Containers/Data/Application/F1F7797D-4966-4E7B-813D-2054F6D0E4DA/Library/Private Documents
2016-03-11 11:54:56.236 ScaryBugs[2205:1446403] *** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.30.14/UIApplication.m:3315
2016-03-11 11:54:56.236 ScaryBugs[2205:1446403] *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Application windows are expected to have a root view controller at the end of application launch’
***** First throw call stack:**
(0x18369d900 0x182d0bf80 0x18369d7d0 0x18401099c 0x188638ac0 0x1886355c0 0x184c53790 0x184c53b10 0x183654efc 0x183654990 0x183652690 0x183581680 0x1883fe580 0x1883f8d90 0x1000c9834 0x1831228b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

and get about 30 or so warnings and as a result cannot run the App at all.
Some examples follow:

/Users/lionelsmith/Desktop/ScaryBugs6/Classes/RootViewController.m:191:22: ‘UIActionSheet’ is deprecated: first deprecated in iOS 8.3 - UIActionSheet is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet instead

/Users/lionelsmith/Desktop/ScaryBugs6/ScaryBugDoc.m:74:1: Writable atomic property ‘data’ cannot pair a synthesized setter with a user defined getter

Since you do not appear to be interested in updating the tutorial to Swift then I believe you should at least update it to the latest version of Objective C or remove the tutorial from your site.

I think I deserve some sort answer as I have purchased many of you books and subscribe to the video tutorials.

Thanks in advance

This tutorial is very old so I’m not surprised there are problems. I’ll let the iOS team lead know of your interest in us updating this tutorial at some point. Thanks!

Thanks Ray,
I realise now why the slow response (I’m an impatient old bugger).
You’ve been busy with RWDevCon.

Also interested in this. Or any other mechanism for exchanging app data with other iPhone users.

The post is old but the subject is still usefull. Is it possible to send a file using Messages app instead e-mail ? How to proceed ? Is the a tutorial ? Thanks, Manoel.

Is this tutorial going to be updated for SWIFT? I would love to be able to do this for an app idea I have!

I am curious about how to import and export more than one bug at a time in a zipped file?

Hi Ray, thank you for your tutorials.

I tried to download a sample project of this tutorial but the link does not work.
“Here is a sample project with all of the code we’ve developed so far in this tutorial series.”
Would like to have a look at the project, any way of downloading it?

Hi Ray

Just wondering if there has been any update to this? Keen to learn how to import and export data via email in swift 3.

Thank you!
Andrew

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]