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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ian Rushton](https://uploads.teamtreehouse.com/production/profile-photos/4283802/micro_thumb_12316157_896177397162557_4391274865200822043_n_1024.jpg)
Ian Rushton
15,789 PointsApp 'saved point'... Is this achieved through the use of databases?
If I want to increment a value as an anchor for questions in a quiz style app, how do I stop it from resetting to the initial value once somebody closes and reopens the app?
Is there some way of holding this incremented value at its new value or is this only achievable through the use of some kind of database?
Any guidance here would be greatly appreciated!
3 Answers
![Jake Adams](https://uploads.teamtreehouse.com/production/profile-photos/5102172/micro_pinky.jpg)
Jake Adams
1,608 PointsA simple solution would be to save the current value to NSUserDefaults. This is only local and won't persist if the user reinstalls the app.
![Nathan Tallack](https://uploads.teamtreehouse.com/production/profile-photos/4003052/micro_NathanBusinessEditedSquare.jpg)
Nathan Tallack
22,160 PointsCore Data is what you are looking for. There is perhaps a course here on TT for it? If not, easy enough to research elsewhere.
Game Centre is what you are looking for to use leaderboards and such like across devices and users. ;)
![Ian Rushton](https://uploads.teamtreehouse.com/production/profile-photos/4283802/micro_thumb_12316157_896177397162557_4391274865200822043_n_1024.jpg)
Ian Rushton
15,789 PointsThanks guys. I will use the NSUserDefaults method for now, but would definitely benefit from learning more about core data! :)
Nathan Tallack
22,160 PointsNathan Tallack
22,160 PointsOh yeah. Did not think of that. Well done. :)