
Core Data in Swift
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Core Data is intricate, powerful, and necessary. Discover the powerful capabilities integrated into Core Data, and how to use Core Data in your iOS and OS X projects. All examples are current for OS X El Capitan, iOS 9, and the latest release of Core Data. All the code is written in Swift, including numerous examples of how best to integrate Core Data with Apple's newest programming language.
Core Data expert Marcus Zarra walks you through a fully developed application based around the Core Data APIs. You'll build on this application throughout the book, learning key Core Data elements such as NSPredicate, NSFetchRequest, thread management, and memory management.
Start with the basics of Core Data and learn how to use it to develop your application. Then delve deep into the API details. Explore how to get Core Data integrated into your application properly, and work with this flexible API to create convenience methods to improve your application's maintainability. Reduce your migration difficulties, integrate your Core Data app with iCloud and Watch Kit, and use Core Data in a queue-based environment. By the end of the book, you'll have built a full-featured application, gained a complete understanding of Core Data, and learned how to integrate your application into the iPhone/iPad platform.
This book is based on Core Data in Objective-C, Third Edition. It focuses on Swift and adds an additional chapter on how to integrate Core Data with an efficient network implementation, with best practices on how to load and pre-load data into your Swift application.
What You Need:
Mac OS X El Capitan and iOS 9 and a basic working knowledge of Swift
More details
Other editions
Additional editions

Person
Marcus S. Zarra has spoken at numerous conferences around the globe and has taught Objective-C at top U.S. colleges. Marcus has been developing iOS applications since day one. Outside of Apple, no one has been working with Core Data longer or on more applications.
Content
- Cover
- Table of Contents
- Introduction
- Is This Book for You?
- What Is Core Data?
- Online Resources
- 1. Before We Begin
- Test Application
- The Storyboard
- The Recipe List
- The Recipe Detail
- The Edit Workflow
- Ready for Core Data
- 2. Under the Hood
- Introducing the NSManagedObjectModel
- Integrating with the NSPersistentStoreCoordinator
- Adding the NSManagedObjectContext
- Working with NSManagedObject Instances
- Building an NSFetchRequest
- NSSortDescriptor
- Wrapping Up
- 3. iOS: NSFetchedResultsController
- How to Use the NSFetchedResultsController
- Under the Hood of the NSFetchedResultsController
- Building Our Own: MSZContextWatcher
- Wrapping Up
- 4. Versioning and Migration
- Some Maintenance Before We Migrate
- A Simple Migration
- The Difference Between Light and Heavy Migrations
- A Heavy/Manual Migration
- Fundamentals of Core Data Versioning
- Wrapping Up
- 5. Performance Tuning
- Persistent Store Types
- Optimizing Your Data Model
- Fetching
- Faulting
- Access Patterns
- Wrapping Up
- 6. Threading
- Threading and Core Data
- Working on the Main Queue
- Working off the Main Queue
- Interqueue Communication
- Parent/Child NSManagedObjectContext Design
- Export Operation
- Import Operation
- Asynchronous Saving
- Debug Concurrency Checking
- Wrapping Up
- 7. Bulk Changes
- Running with Scissors
- Doing Bulk Updates
- Notifying the Application of Changes
- Bulk Deletes
- Things to Consider When Using the Bulk Change APIs
- Wrapping Up
- 8. Network Operations
- The Problem and the Approach
- The Solution
- Accessing the Network Operations
- Wrapping Up
- 9. Using Core Data with iCloud
- Introducing the UIManagedDocument
- Direct NSManagedObjectContext to iCloud
- Consuming Changes from iCloud
- Under the Hood
- Migrating an Existing Application
- Desktop iCloud Integration
- Issues with Data Quantities
- Sharing Data Between iOS and OS X
- Wrapping Up
- 10. Adding a Desktop Foundation
- Our Application
- Our Application Design
- Sharing the Data Model
- Building the Controller Layer
- Building the User Interface
- Adding a Splash of Code
- Wrapping Up
- 11. Bindings, KVC, and KVO
- Key Value Coding
- Key Value Observing
- Cocoa Bindings and Core Data
- Other Interface Elements That Use KVO, KVC, and Core Data
- Wrapping Up
- 12. Spotlight, Quick Look, and Core Data
- Integrating with Spotlight
- Integrating with Quick Look
- Putting It All Together
- Wrapping Up
- Index
- - A -
- - B -
- - C -
- - D -
- - E -
- - F -
- - G -
- - H -
- - I -
- - J -
- - K -
- - L -
- - M -
- - N -
- - O -
- - P -
- - Q -
- - R -
- - S -
- - T -
- - U -
- - V -
- - W -
- - X -
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.