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

Is Core Data necessary for an app?

Is Core Data necessary for an app if you want to remember things for the next time its used?

1 Answer

Core Data specifically? No. There are many options for what you want to do. There are plists, sqlite databases (google around for objective-c or swift wrappers), and even other full fledged databases like Realm. Storing data in the cloud and retrieving it over the web is also an option. If you tell us what you're looking to do we may be better able to assist you.

Thanks for replying! For my app, one of the things I want to be able to do is remember Usernames and Passwords for my app that are created through text fields. I know the tutorial on building a Diary App in objective C covers this, but I can't seem to get the app to work, so I was looking for other methods besides Core Data.

What do you think the best method out of your list would be to use in my case, and are there tutorials you can find on using that method?

I wouldn't use plists for that. It could get very complicated if you have a number of users on a single device. I also am not sure how secure plists are for storing sensitive data. I'm thinking not very. I personally would look into sqlite. That's a half guess though based on the limited info we have on how your app works. If you want to get more detailed but don't want to put all the info out in public (which is understandable) you can drop me a line at patrickcl75 (at) gmail (dot) com and I'll see if I can't give you a more specific answer. Obviously, swap out the at and dot for the actual characters.