Here’s a few CoreData-related posts we stumbled across since our first resource collection worth your attention:
A nasty bug if it bites you.
- UITableView-based “RootView” capable of displaying all entities of a certain type with the ability to:
- Sort based on any number of keys
- Create sections based on a key path
- Display section index titles, in either address book style or based on your section key path
- UITableView-based “DetailView” capable of displaying and editing any number of attributes or relationships in a given entity:
- to-many (ordered or non-ordered) relationship
- to-one relationship
- strings (single or multiple line)
- boolean choice
… In iOS4, Apple introduced data protection. It gives you the ability to encrypt the hardware keys used to encrypt your files and to erase those keys when the system is locked – leaving your file unreadable until the phone is unlocked and the keys are regenerated.
This level of protection is not built in by default though. The user has to enable it (or an IT department can enable it and force users to have it on) and your code must set an attribute on your Core Data sqlite store as well…
… There is a persistent rumor that you cannot use Core Data in a multi-threaded environment. This is patently false. Core Data works very well in a multi-threaded environment but you need to play by the rules…
… was recently faced with having to add re-ordering for a list of entities in a UITableView. The methods I found online for accomplishing this all suggested using an NSMutableArray as the data source for the table view. That will work, but I came up with another method, though similar, that achieved what I need without having to switch from using my NSFetchedResultsController as the data source behind the UITableView…
And why, yes, of course Ray Wenderlich has a series of excellent tutorials on Core Data –like everything else, it seems — to read if you’re starting out:
Here’s another collection of Core Data Odds and Ends.
And how to install your app with Core Data Starting Data.