Reputation: 61
So I'm new in the iphone app development. I read many stuff, watched many tutorials and the one thing that confuses me is core data.
So I'm trying to create an app like grubhub app on the iPhone. My iPhone app design so you can understand what I'm creating: when you open the app you will see a tableview with a list of restaurants' names then when you press a restaurant name it should take you to another page to choose which one of the ones in your area and then it takes you to the menu and you select items etc. and you pay.
My question is where do I use core data? And why should I use it in my app?
Upvotes: 0
Views: 801
Reputation: 1329
It all depends own you.
Core Data definitely have a advantage over other database, but there will be a learning curve.
You should also look into SQLite, there are quite a few libraries that will help your life easier. (I moved from core data to sqlite)
Check out Cocovapods check the pods available and see what you like and go with it
I use SQLite Swift for SQLite management.
Also check out Awesome iOS for a curated list of core-data pods
Upvotes: 0
Reputation: 4917
Core Data is for persistent storage of data. Learn Core Data from any tutorial. In your app you can use Core data for tableview data. With Core data storing and retrieving of data is very easy.
Upvotes: 0
Reputation: 1336
Actually, Core Data is simple data storage. Using core data you can store data in your local iPhone storage. You can use SQLLite or any other database type. You should use Core Data when you will have to need store data in local phone storage not on the server.
Upvotes: 0
Reputation: 21
Core Data is basically a way how to store the model(data) objects of your project. (I would recommend viewing the MVC - Model View Controller pattern to understand what the model is if you are not familiar.)
The big advantage is that if you use core data in the intended way you can store your data very easy persistent on the phone and you have a good project structure.
A nice tutorial how to use it can be found here: http://www.raywenderlich.com/934/core-data-tutorial-for-ios-getting-started
Ps: Thats the why part and the where part can be found in the tutorial.
Upvotes: 1