Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Patrick Donahue
Patrick Donahue
9,523 Points

Saving Information

I am creating an app that I need to save information for. I need to save a photo, date, location and so on. I do not want to use a server because I am cheap and if I ever decide to stop supporting the app I want people to still have access to their items.

So my question is - should I just use core data and keep it within the app or some other way.

Any suggestions would be great! Thanks!

4 Answers

Marek Hrusovsky
Marek Hrusovsky
4,217 Points

Core data is one solution (harder for beginners) other simple one is to implement NSCoding protocol (easy for beginners) Nice article with example has NSHipster (http://nshipster.com/nscoding/). Go and read it.

Jesus Guerra Rosas
Jesus Guerra Rosas
3,287 Points

Agreed with Marek Hrusovsky , but here is a good tutorial for Core Data http://goo.gl/gVlTnl you could try with that. But ,once you "understand" how core data works it will make your life easier. To save the photo, I will recommend you use the NSFile?Manager http://nshipster.com/nsfilemanager/ you could use core data to save the name of the file and then retrieve it from there.

Chris Olstad
Chris Olstad
1,540 Points

Check out Magical Record. I had a real hard time with Core Data, especially when I had to go back to certain parts of my code and make changes. Magical Record changed that and made it much easier to work with and, in the end, saved me a ton of time.

Patrick Donahue
Patrick Donahue
9,523 Points

Thanks for the good reading materials on nscoding and nsfilemanager. I have done quite a bit of tutorials in core data but I still have a hard time "getting it". But from what I hear - once you get it - you love it! I will let you guys know what I decide on. Or if I figure it out some other way.