Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Authors
About the Technical Reviewers
Acknowledgments
Introduction
Chapter 1: Touring Core Data
What Is Core Data?
Core Data Components
Creating a New Core Data Project
Creating the Project
Touring the Core Data Components
Initializing the Core Data Components
Creating a Managed Object Model
Adding Some Objects
Viewing the Data
Adding Core Data to an Existing Project
Creating a Core Data-less Application
Adding the Core Data Framework
Adding a Managed Object Model
Adding and Initializing the Core Data Stack
Creating the Object Model
Adding Objects to PersistenceApp
Wrapping Up
Chapter 2: Building Data Models
Designing Your Database
Relational Database Normalization
Building a Simple Model
Entities
Attribues
Key-Value Coding
Generating Classes
Relationships
Storing and Retrieving Data
Inserting New Managed Objects
Retrieving Managed Objects
Predicates
Fetched Properties
Notifications
Notification upon Creation
Notification upon Fetch
Notification upon Change
Registering an Observer
Receiving the Notifications
Conclusion
Chapter 3: Advanced Querying
Building WordList
Creating the Application
Building the Data Model
Creating the User Interface
Loading and Analyzing the Word List
Getting a Count
Displaying the Statistics
Querying Relationships
Understanding Predicates and Expressions
Viewing Your SQL Queries
Creating Single-Value Expressions
Creating Collection Expressions
Comparing Expressions Using Different Predicate Types
Using Different Comparison Modifiers
Using Different Options
Adding It Up: Using Compound Predicates
Aggregating
Using Subqueries
Sorting
Summary
Chapter 4: Attending to Data Quality
Seeding Data
Using the Seed Store
Updating Seeded Data in Subsequent Releases
Undoing and Redoing
Undo Groups
Limiting the Undo Stack
Disabling Undo Tracking
Adding Undo to BookStore
Experimenting with the Undo Groups
Dealing with Errors
Handling Core Data Operational Errors
Handling Validation Errors
Handling Validation Errors in BookStore
Implementing the Validation Error-Handling Routine
Summary
Chapter 5: Integrating with the User Interface
Displaying Table Data with NSFetchedResultController
Creating a Fetched Results Controller
Creating the Fetched Results Controller Delegate
Storing Images
Adding Screenshots to CoreDump
Verifying the External Storage
Searching the Fetched Results in the Table
Adding the Search Controller
Retrieving the Search Results
Displaying the Search Results
Conclusion
Chapter 6: Versioning and Migrating Data
Versioning
Lightweight Migrations
Migrating a Simple Change
Renaming Entities and Properties
Using a Mapping Model
Understanding Entity Mappings
Understanding Property Mappings
Creating a New Model Version That Requires a Mapping Model
Creating a Mapping Model
Migrating Data
Running Your Migration
Custom Migrations
Making Sure Migration Is Needed
Setting Up the Migration Manager
Running the Migration
Summary
Chapter 7: Transforming and Encrypting Data
Using Transformable
Creating the Project and Adding Core Data
Creating Taps
Creating the View and Displaying the Taps
Hey, Wait a Minute! How Did My Color Transform?
Encrypting Data
Creating the Project and Setting Up the Core Data Model
Performing the Encryption and Decryption
Setting Up the Detail View to Edit a Note
Prompting For and Verifying the Password
An Alternative to Transformable: Data Protection
Summary
Chapter 8: Talking to Services: iCloud and Dropbox
Integrating with iCloud
Using iCloud’s Ubiquity Container
Synching Content
Integrating with Dropbox Datastore API
Setting Up the API Access
Creating a Blank App to Use with Dropbox
Configuring the Callback URL
Linking to Dropbox Using the Datastore API
Creating and Synching Data with the Dropbox API
Using Core Data with the Dropbox Datastore API: ParcelKit
Adding the Required Frameworks for Dropbox and ParcelKit
Integrating DropboxEvents with Dropbox
Conclusion
Chapter 9: Tuning Performance, Memory Usage, and Multithreading
Tuning Performance
Building the Application for Testing
Running Your First Test
Faulting
Prefetching
Caching
Expiring the Cache
Uniquing
Improve Performance with Better Predicates
Analyzing Performance
Dealing with Multiple Threads
Thread Safety
Oh Come On, What Could Possibly Go Wrong?
Gratuitous User Interface
Initializing the Stack on a Different Thread
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →