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

Question about data storage.

I have a question about data store when it comes to iOS applications. I have searched the documentation and couldn't find an answer.

Say I want to create a simple note taking application. I want to store the notes in either an array or a dictionary. When I append a new note to either an array or dictionary, does that append retain its value after I restart the application?

If it does not, how would you go about creating a file? Also, how would you read and write data to that file?

This is a pretty complicated question, so a link to a related discussion or document would be great. Also, I am looking for the Swift equivalent to this.

hi, if you can , i recommend to watch here . He tells you everything from beginning very detailed . Here on treehouse i think the introduction is a bit poor to C .

http://www.lynda.com/C-tutorials/Executing-statements-repeatedly-loops/164457/180388-4.html

get to the storage article , here I'm on loops.

1 Answer

You could also achieve this with using core data in swift. Treehouse does not currently offer Core Data courses in Swift but I am sure it is in the works. They do offer a Courses on Core Data in Objective-C but if you would like to do this in swift I found this video that might be able to help you out. :)

Ozzie

Great video, what I was looking for. Thank you.