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

Store variables for the next time the app is used

I´m trying out a few stuff in Xcode, just playing around. And I´m wondering about how you would tell the phone to save this variable to be used the next time the app is used.

Let´s say I have an app where a user writes his name in an textfield. And I store that in a variable and display it in a label. Next time the app is used I want the app to remember the variables value and then remember the name.

Is variable automaticly remembered or how does this work?

1 Answer

Watch this video about using Core Data in Swift