IOS core data is the most efficient way to save and load data in iPhone and iPad app. It is also more complicated than another ways such as NSUserDefaults or NSFileManager. The best way to help us fully understand how IOS core data works is writing an real project. In this tutorial, I will design a simple iPhone app to demonstrate the whole process of using core data in iOS app. The process includes:
- How to design the data structure with core data
- How to initialise the core data
- How to add data in core data
- How to fetch data from core data
- How to fetch data from core data by filter
Before we start the core data tutorial, let me briefly describe this small app first. This app will store 4 people’s information by using core data framework. The information includes name, password, gender, email and address. The main features of this example app is showing people’s information and search people by name. All above tasks will be implemented by core data framework.
Read more