Join Simon Allardice for an in-depth discussion in this video Creating fetch request templates, part of Core Data for iOS and OS X.
If you know that what you'll need to do in your application is create a whole bunch of…fetchRequests together with predicates,…one option that you have is that instead of writing this in code you can predefine these…in your data model file using the Model Editor and save them as what are called Fetch Request templates.…Let me show you what I mean.…Say that I knew one thing I'd have to do in my application is fetch all the courses…that have the word essential in them--so fetching in my case, all the essential training courses or iOS essentials--…what I could do is go into this Data Model file.…
Now under the Entities section, I can see there is a Fetch Requests section.…Nothing is here right now, but I can add something.…Either from the Editor menu we have got an Add Fetch Request or from the button down…at the bottom that currently says Add Entity but there is a little arrow there that I can…hold down and click and say Add Fetch Request.…I actually prefer using the Editor menu because when you select another option from the button…
- Understanding Core Data and object persistence frameworks
- Creating a Core Data project
- Exploring data modeling
- Creating entities, attributes, and relationships
- Creating managed objects
- Fetching in Core Data
- Implementing undo and redo support
- Creating a Core Data Cocoa app without code
- Responding to validation issues
- Converting store types
- Preloading default data
Skill Level Intermediate
Q: In the CoursesViewController.m file, I receive a message that the method dismissModalViewControllerAnimated is no longer supported by Apple. Is there a newer method to use?
A: You may have received the warning that a call to the dismissModalViewControllerAnimated: method is now deprecated.
This is a recently deprecated method, so the code _will_ continue to work using that call, but to remove the warning, change the code from:
to the current recommended version:
[self dismissViewControllerAnimated:YES completion:nil];
It should take care of that message.
1. Getting Started
2. Modeling in Core Data
3. Saving in Core Data
Creating managed objects12m 46s
4. Fetching in Core Data
Using predicates9m 32s
5. Putting It Together: iOS
6. Putting It Together: Cocoa
7. Store Types and Model Changes
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.