You are previewing Learning iCloud Data Management: A Hands-On Guide to Structuring Data for iOS and OS X.
O'Reilly logo
Learning iCloud Data Management: A Hands-On Guide to Structuring Data for iOS and OS X

Book Description

“A great read for iOS developers who want to learn if iCloud is right for their app and dive right in with lots of practical code examples.”
—Jon Bell,

Get Hands-On Mastery of iCloud Data Management for iOS 7 and OS X Mavericks

As apps rapidly move into business and the cloud, iOS and OS X developers need new data management techniques. In Learning iCloud Data Management, renowned Apple database expert Jesse Feiler shows you how to use Apple’s latest APIs and technologies to structure and synchronize all forms of data. Feiler helps you understand the issues, implement efficient solutions, and deliver highly usable apps that seamlessly synchronize during the “Round Trip” between iOS and OS X and back again.

This guide walks you through integrating several key Apple data management technologies, including the Address Book and Calendar APIs. Feiler shows you how to structure data so it’s easy to build great Cocoa and Cocoa Touch user interfaces and to quickly incorporate reliable iCloud syncing. Step by step, you’ll discover how to blend Apple’s standard application data structures with your own user data to create a feature-rich and fully syncable environment.

Coverage includes

  • Understanding iCloud from the developer’s and user’s point of view

  • Accessing synchronized user calendars and contacts

  • Integrating Reminders into your apps

  • Playing by iCloud’s user privacy rules

  • Applying consistent iOS Settings and OS X Preferences across user devices

  • Managing persistent storage with Core Data

  • Using Xcode Project Workspaces for shared development

  • Adding data to app bundles and resources

  • Integrating iCloud infrastructure, file wrappers, documents, and data

  • Completing the”Round Trip” between both iOS and OS X

Table of Contents

  1. About This eBook
  2. Title Page
  3. Copyright Page
  4. Contents at a Glance
  5. Contents
  6. Preface
    1. Who Should Read This Book
    2. Downloading the Example Files
    3. How This Book Is Organized
  7. Acknowledgments
  8. About the Author
  9. We Want to Hear from You!
    1. Reader Services
  10. Introduction
  11. I: Introducing iCloud
    1. 1. Exploring iCloud and Its User Experience
      1. Looking at Cloud Computing
      2. Understanding the iCloud Paradigm
      3. Making the Round Trip
      4. Chapter Summary
      5. Exercises
    2. 2. Setting Up iCloud for Development
      1. Managing App Security on iOS and OS X
      2. Looking Inside the iCloud Basics
      3. Using iCloud in Your App
      4. Chapter Summary
      5. Exercises
  12. II: Using the APIs
    1. 3. Introducing the APIs and the First Apps
      1. Getting Started as an Apple Developer
      2. Looking at the APIs
      3. Introducing the Built-In Data Apps
      4. Wiring Up the Interfaces
      5. Chapter Summary
      6. Exercises
    2. 4. Working with the AddressBook API for Contacts
      1. Considering the AddressBook API on iOS and OS X
      2. Sending Mail from the iOS App
      3. Sending Mail from the OS X App
      4. Using Property Lists for Storing and Syncing
      5. Chapter Summary
      6. Exercises
    3. 5. Managing Calendars and Reminders with the Event Kit API
      1. Exploring the Event Class Hierarchy
      2. Setting OS X Permissions
      3. Working with the Calendar Database
      4. Adding a Reminder to the App on iOS
      5. Adding an Event to the App on OS X
      6. Chapter Summary
      7. Exercises
    4. 6. Protecting the Privacy of User Data
      1. The Need for Privacy
      2. Looking at Apple’s Rules and Guidelines
      3. Best Practices in App Privacy
      4. Chapter Summary
      5. Exercises
  13. III: Using the Technologies
    1. 7. Introducing Blocks, Threads, and Notifications
      1. Catching Up with Blocks and Threads
      2. Getting Up to Speed with Notifications
      3. Receiving Notification of iCloud Availability Changes
      4. Introducing the Second Project
      5. Getting Ready to Move On
      6. Chapter Summary
      7. Exercises
    2. 8. Using Key-Value Coding (KVC)
      1. Setting Up a Controlled Testing Environment
      2. Implementing KVC
      3. Testing iCloud on iOS Simulator
      4. Preparing Your Project for Testing
      5. Sharing the Key-Value Store for the Round Trip
      6. Setting Up and Using NSUbiquitousKeyValueStore
      7. Chapter Summary
      8. Exercises
    3. 9. Using Preferences, Settings, and Keychains with iCloud
      1. Using Property Lists
      2. Working with User Defaults
      3. Registering Defaults
      4. Chapter Summary
      5. Exercises
    4. 10. Managing Persistent Storage with Core Data
      1. Understanding the Goals of Core Data
      2. Structuring Data
      3. Understanding How Core Data Works with iCloud
      4. Introducing the Core Data Project
      5. Using the Xcode Data Modeling Tool
      6. Examining the Core Data Stack
      7. Chapter Summary
      8. Exercises
    5. 11. Using Xcode Workspaces for Shared Development
      1. Building on the Digital Hub
      2. Reviewing Xcode File Management
      3. Setting Up a Multiproject Workspace
      4. Creating a Multiproject Workspace
      5. Chapter Summary
      6. Exercise
    6. 12. Adding Data to Apps with Bundles and Resources
      1. Packages, Bundles, and Resources
      2. Looking at Sandboxed Files
      3. Including Property Lists
      4. Including a Core Data Store
      5. Chapter Summary
      6. Exercises
  14. IV: Using iCloud Documents and Data
    1. 13. Adding the iCloud Infrastructure
      1. Exploring the Workspace for the App
      2. Debugging iCloud Apps with
      3. Building the App
      4. Creating the Shared Folder
      5. Creating the App’s Classes
      6. Chapter Summary
      7. Exercises
    2. 14. Working with File Wrappers in iCloud
      1. Exploring Files, File Wrappers, and Documents
      2. How Users Manage iCloud Files
      3. Starting the Placid Project
      4. Writing the Code
      5. Working with the Storyboard
      6. Chapter Summary
      7. Exercises
    3. 15. Working with iOS Documents
      1. Planning the App’s Structure
      2. Starting the Loon Project
      3. Writing the Code
      4. Chapter Summary
      5. Exercises
    4. 16. Working with OS X Documents
      1. Evolution of NSDocument and UIDocument Differences
      2. Planning the Project
      3. Starting the Chazy Project
      4. Writing the Code
      5. Testing the App
      6. Chapter Summary
      7. Exercises
    5. 17. Working with Core Data and iCloud
      1. Looking at the iCloud Core Data Implementation
      2. Fallback Stores
      3. Setting Up and Managing Persistent Stores
      4. Managing Account Changes
      5. Database Migration
      6. Chapter Summary
      7. Exercises
    6. 18. Completing the Round Trip
      1. How the User Sees the Round Trip
      2. How the Developer Sees the Round Trip
      3. Configuring the Shared Ubiquity Container
      4. Using a Shared iCloud Controller
      5. Moving Documents to iCloud
      6. Moving Documents from iCloud to Local Storage
      7. Chapter Summary
      8. Exercises
  15. Index