Book Reviews - Learning Core Data for iOS with Swift

Book Reviews - Learning Core Data for iOS with Swift
Get Started Fast with Core Data App Development Using iOS 9, Swift, and Xcode 7
Core Data is a remarkably mature, stable, and fast platform for data access, and Swift is a world-class language for applying it. Now, there’s a complete guide to using Core Data and Swift together in production apps. Tim Roadley shows you how to gain the benefits of a relational database without writing SQL queries, so you can get more done faster, with less coding.
This book fully reflects Apple’s latest iOS 9 platform innovations and teaches Core Data entirely with Swift examples. It guides you step-by-step through creating a modern data-driven iOS app that fully integrates iCloud via CloudKit for public data sharing.
Roadley introduces up-to-date patterns and best practices designed to overcome the frustrations of Core Data development. Each chapter builds on the last, introducing new topics in the order you’ll implement them and extending your skills simply and intuitively.
Each chapter offers downloadable project code, along with exercises to help you explore even further, either as a self-learner or a student in an iOS development course. Roadley even shows how to build helper classes that simplify reuse of his example code.
If you’re an experienced iOS developer, here are all the Swift skills and resources you need to integrate data into any app— quickly, easily, and painlessly.
Coverage includes
  • Understanding what Core Data is and what it can (and can’t) do
  • Configuring basic managed object models, and choosing data types
  • Expanding data models without introducing errors
  • Using relationships and entity inheritance to unlock more power
  • Delivering memory-efficient, high performance table views
  • Enabling users to easily modify managed object attributes
  • Generating persistent stores of preloaded default data
  • Using Deep Copy to copy objects and relationships between persistent stores
  • Optimizing performance by eliminating bottlenecks and offloading intensive tasks to the background
  • Implementing efficient search
  • Integrating diverse iCloud accounts and preferences
  • Mastering advanced iCloud integration, including entity-level seeding and unique object de-dupe
  • Leveraging public CloudKit databases to sync data across users with different iCloud accounts
1 Your First Core Data Application
What Is Core Data?
Persistent Store Coordinator
Managed Object Model
Managed Object Context
When to Use Core Data
Introducing the Groceries Application
Adding Core Data to an Existing Application
Implementing the Core Data Helper
Adding Paths
Adding the Core Data Stack
Adding the Setup Section
Adding the Saving Section
Adding a Managed Object Model File
Summary
Exercises
2 Managed Object Model Basics
What Is a Managed Object Model?
Entities
Attributes
Integer 16/32/64
Float and Double
Decimal
String
Boolean
Date
Binary Data
Transformable
Attribute Settings
Subclassing NSManagedObject
Scalar Properties for Primitive Data Types
Introducing the Demo Function
Creating a Managed Object
Backend SQL Visibility
Fetching Managed Objects
Sorting Fetch Requests
Filtering Fetch Requests
Fetch Request Templates
Deleting Managed Objects
Summary
Exercises
3 Managed Object Model Migration
Changing a Managed Object Model
Adding a Model Version
Lightweight Migration
Default Migration
Migration Manager
Introducing MigrationVC.swift (Migration View Controller Code)
Introducing CDMigration.swift (Core Data Migration Code)
Summary
Exercises
4 Managed Object Model Expansion
Relationships
Delete Rules
Introducing CDOperation.swift (Core Data Operation)
Delete Rule Testing
Entity Inheritance
Summary
Exercises
5 Table Views
Table View Basics
Core Data Table Views
Introducing CDTableViewController
Expanding CDTableViewController
DATASOURCE: UITableView
DELEGATE: NSFetchedResultsController
CDTableViewController Subclasses
Enhancing PrepareTVC
Preparing Test Data
Deletion and Cell Selection for PrepareTVC
Interaction for PrepareTVC
Introducing ShopTVC
Cell Selection for ShopTVC
INTERACTION for ShopTVC
Summary
Exercises
6 Views
View Basics
The Target View Hierarchy
Introducing ItemVC
Keeping Reference to a Selected Item
Passing a Selected Item to ItemVC
Configuring the Scroll View and Text Fields
Implementing ItemVC
DELEGATE: UITextField
The VIEW Section
Adding Functionality to NSManagedObject Subclasses
Units, Home Locations, and Shop Locations
Adding and Editing Units
Implementing UnitsTVC
Implementing UnitVC
Segueing from UnitsTVC to UnitVC
Adding and Editing Home or Shop Locations
Configuring the Home Location Views
Configuring the Shop Location Views
Summary
Exercises
7 Picker Views
Picker View Basics
Introducing CDPickerTextField
Introducing UnitPickerTF
Creating the Unit Picker
Connecting the Unit Picker
Configuring ItemVC for the Unit Picker
Introducing LocationAtHomePickerTF
Introducing LocationAtShopPickerTF
Using the Location Pickers
Connecting the Location Pickers
Configuring ItemVC for the Location Pickers
Picker-Avoiding Text Field
Summary
Exercises
8 Preloading Data
Including Default Data
Indicating Whether an Import Is Required
Importing from XML
Creating an Import Context
Preventing Duplicate Default Data
Triggering a Default Data Import
Finding or Creating Managed Objects
Mapping XML Data to Entity Attributes
Importing from a Persistent Store
Using the Default Data Store as the Initial Store
Summary
Exercises
Copying a Unique Object
Establishing a To-One Relationship
Establishing a To-Many Relationship
Establishing an Ordered To-Many Relationship
Copying Relationships
Deep Copy Entities
Triggering a Deep Copy
Summary
Exercises
10 Performance
Identifying Performance Issues
Implementing the Camera
Implementing the Image Picker Controller Delegates
Generating Test Data
Merge Policies
Measuring Performance with SQLDebug
Measuring Performance with Instruments
Improving Performance
Model Optimization
Handling Large Objects
Cleaning Up
Summary
Exercises
11 Background Processing
Implementing Background Save
Configuring an Import Context Parent
Faulting Objects
Generating Thumbnails
Summary
Exercises
12 Search
Updating CDTableViewController
Updating PrepareTVC
Search Optimization
Summary
Exercises
13 iCloud
iCloud Basics
Enabling iCloud
Updating CDHelper for iCloud
Adding an iCloud Store
Handling iCloud Notifications
The Debug Navigator
Summary
Exercises
14 Taming iCloud
De-Duplication
Identifying Duplicates
Deleting Duplicates
Triggering De-Duplication
Seeding
Preparing Seed Variables
Adding Seed Helper Functions
Developing with a Clean Slate
Configurations
Summary
Exercises
15 CloudKit Sync: Uploading Objects
Introducing CloudKit
CloudKit Database Synchronization Limitations
Introducing CDCloudSync
Public Data Groups
Cache Status
CloudKit Building Blocks
Uploading New Records and Relationships
Adding Synchronization Logic
Preparing the Managed Object Model for Sync
Summary
Exercises
16 CloudKit Sync: Downloading Changes and Handling Deletions
CloudKit Building Blocks (Continued)
Change Synchronization
Deletion Synchronization
Quality Assurance
Testing the Network
Updating Synchronization Logic
Adding CDCloudSync to Your Own Applications
Summary
Exercises
Thank You!
A Preparing the Groceries Application
New Xcode Project
Storyboard Design
App Icons and Launch Images
Introducing GenericVC
B Finalizing the Groceries Application
New Features
Photo Library and Photo Deletion Support
Favorites
Icon Badge
Location De-Duplication Logic

No comments:

Post a Comment