2015年5月5日 星期二

Mastering-iOS-Frameworks-Edition-Developers



http://www.amazon.com/Mastering-iOS-Frameworks-Edition-Developers/dp/0134052498

Apple’s iOS SDK provides an amazingly powerful collection of frameworks. But it has been difficult to find detailed and useful knowledge about them–until now. With this book’s practical insights and tested code, you can use Apple’s frameworks to create apps that are more innovative and usable…faster and more reliable…more successful and profitable.


Kyle Richter and Joe Keeley focus on intermediate-to-advanced techniques that professional iOS developers can use every day. Their far-reaching coverage ranges from social support to security, Core Data to iCloud–even Apple Watch.

Organized as a convenient modular reference, nearly every chapter contains a complete Objective-C sample project. A multi-chapter Game Center case study shows how multiple iOS features can be combined to do even more.

All source code may be downloaded at https://github.com/dfsw/icf.

Coverage includes:
  • Adding physics-like animation and behaviors to UIViews
  • Using Core Location to determine device location, display customized maps, and implement geofencing
  • Making games and apps social with Leaderboards
  • Accessing music and image collections
  • Building health/fitness apps with HealthKit
  • Integrating with home automation via HomeKit
  • Passing data between platforms using JSON
  • Setting up local and remote notifications
  • Remotely storing and syncing data with CloudKit
  • Accessing app functionality with extensions
  • Effortlessly adding AirPrint support
  • Providing Handoff continuity between iOS 8 and Yosemite devices
  • Getting productive with Core Data
  • Integrating Twitter and Facebook via Social Framework
  • Performing resource-intensive tasks with Grand Central Dispatch
  • Securing user data with Keychain and Touch ID
  • Customizing collection views
  • Making the most of gesture recognizers
  • Creating and distributing “passes”
  • Debugging, instrumenting, and profiling apps

    目錄:
    Table of Contents
    1 UIKit Dynamics
    The Sample App
    Introduction to UIKit Dynamics
    Implementing UIKit Dynamics
    Gravity
    Collisions
    Attachments
    Springs
    Snap
    Push Forces
    Item Properties
    In-Depth UIDynamicAnimator and UIDynamicAnimatorDelegate
    Summary
    2 Core Location, MapKit, and Geofencing
    The Sample App
    Obtaining User Location
    Requirements and Permissions
    Checking for Services
    Starting Location Request
    Parsing and Understanding Location Data
    Significant Change Notifications
    Using GPX Files to Test Specific Locations
    Displaying Maps
    Understanding the Coordinate Systems
    MKMapKit Configuration and Customization
    Responding to User Interactions
    Map Annotations and Overlays
    Adding Annotations
    Displaying Standard and Custom Annotation Views
    Draggable Annotation Views
    Working with Map Overlays
    Geocoding and Reverse-Geocoding
    Geocoding an Address
    Reverse-Geocoding a Location
    Geofencing
    Checking for Regional Monitoring Capability
    Defining Boundaries
    Monitoring Changes
    Getting Directions
    Summary
    3 Leaderboards
    The Sample App
    Spawning a Cactus
    Cactus Interaction
    Displaying Life and Score
    Pausing and Resuming
    Final Thoughts on Whack-a-Cac
    iTunes Connect
    Game Center Manager
    Authenticating
    Common Authentication Errors
    iOS 6 and Newer Authentication
    Submitting Scores
    Adding Scores to Whack-a-Cac
    Presenting Leaderboards
    Score Challenges
    Going Further with Leaderboards
    Summary
    4 Achievements
    iTunes Connect
    Displaying Achievement Progress
    Game Center Manager and Authentication
    The Achievement Cache
    Reporting Achievements
    Adding Achievement Hooks
    Completion Banners
    Achievement Challenges
    Adding Achievements into Whack-a-Cac
    Earned or Unearned Achievements
    Partially Earned Achievements
    Multiple Session Achievements
    Piggybacked Achievements and Storing Achievement Precision
    Timer-Based Achievements
    Resetting Achievements
    Going Further with Achievements
    Summary
    5 Getting Started with Address Book
    Why Address Book Support Is Important
    Limitations of Address Book Programming
    The Sample App
    Getting Address Book Up and Running
    Reading Data from the Address Book
    Reading Multivalues from the Address Book
    Understanding Address Book Labels
    Working with Addresses
    Address Book Graphical User Interface
    People Picker
    Programmatically Creating Contacts
    Summary
    6 Working with Music Libraries
    The Sample App
    Building a Playback Engine
    Registering for Playback Notifications
    User Controls
    Handling State Changes
    Duration and Timers
    Shuffle and Repeat
    Media Picker
    Programmatic Picker
    Playing a Random Song
    Predicate Song Matching
    Summary
    7 Implementing HealthKit
    Introduction to HealthKit
    Introduction to Health.app
    The Sample App
    Adding HealthKit to a Project
    Requesting Permission for Health Data
    Reading Characteristic HealthKit Data
    Reading and Writing Basic HealthKit Data
    Reading and Writing Complex HealthKit Data
    Summary
    8 Implementing HomeKit
    The Sample App
    Introduction to HomeKit
    Setting Up HomeKit Components
    Developer Account Setup
    Enabling HomeKit Capability
    Home Manager
    Home
    Rooms and Zones
    Accessories
    Services and Service Groups
    Actions and Action Sets
    Testing with the HomeKit Accessory Simulator
    Scheduling Actions with Triggers
    Summary
    9 Working with and Parsing JSON
    JSON
    Benefits of Using JSON
    JSON Resources
    The Sample App
    Accessing the Server
    Getting JSON from the Server
    Building the Request
    Inspecting the Response
    Parsing JSON
    Displaying the Data
    Posting a Message
    Encoding JSON
    Sending JSON to the Server
    Summary
    10 Notifications
    Differences Between Local and Push Notifications
    The Sample App
    App Setup
    Creating Development Push SSL Certificate
    Development Provisioning Profile
    Custom Sound Preparation
    Registering for Notifications
    Scheduling Local Notifications
    Receiving Notifications
    Push Notification Server
    Sending the Push Notifications
    Handling APNs Feedback
    Summary
    11 Cloud Persistence with CloudKit
    CloudKit Basics
    The Sample App
    Setting Up a CloudKit Project
    Account Setup
    Enabling iCloud Capabilities
    CloudKit Concepts
    Containers
    Databases
    Records
    Record Zones
    Record Identifiers
    Assets
    CloudKit Basic Operations
    Fetching Records
    Create and Save a Record
    Update and Save a Record
    Subscriptions and Push
    Push Setup
    Subscribing to Data Changes
    User Discovery and Management
    Managing Data in the Dashboard
    Summary
    12 Extensions
    Types of Extensions
    Today
    Share
    Action
    Photo Editing
    Document Provider
    Custom Keyboard
    Understanding Extensions
    API Limitations
    Creating Extensions
    Today Extension
    Sharing Code and Information between Host App and Extension
    Apple Watch Extension
    Summary
    13 Handoff
    The Sample App
    Handoff Basics
    Implementing Handoff
    Creating the User Activity
    Continuing an Activity
    Implementing Handoff in Document-Based Apps
    Summary
    14 AirPrint
    AirPrint Printers
    Testing for AirPrint
    Printing Text
    Print Info
    Setting Page Range
    UISimpleTextPrintFormatter
    Error Handling
    Starting the Print Job
    Printer Simulator Feedback
    Print Center
    UIPrintInteractionControllerDelegate
    Printing Rendered HTML
    Printing PDFs
    Summary
    15 Getting Up and Running with Core Data
    Deciding on Core Data
    Sample App
    Starting a Core Data Project
    Core Data Environment
    Building Your Managed Object Model
    Creating an Entity
    Adding Attributes
    Establishing Relationships
    Custom Managed Object Subclasses
    Setting Up Default Data
    Inserting New Managed Objects
    Other Default Data Setup Techniques
    Displaying Your Managed Objects
    Creating Your Fetch Request
    Fetching by Object ID
    Displaying Your Object Data
    Using Predicates
    Introducing the Fetched Results Controller
    Preparing the Fetched Results Controller
    Integrating Table View and Fetched Results Controller
    Responding to Core Data Changes
    Adding, Editing, and Removing Managed Objects
    Inserting a New Managed Object
    Removing a Managed Object
    Editing an Existing Managed Object
    Saving and Rolling Back Your Changes
    Summary
    16 Integrating Twitter and Facebook Using Social Framework
    The Sample App
    Logging In
    Using SLComposeViewController
    Posting with a Custom Interface
    Posting to Twitter
    Posting to Facebook
    Creating a Facebook App
    Accessing User Timelines
    Twitter
    Facebook
    Summary
    17 Working with Background Tasks
    The Sample App
    Checking for Background Availability
    Finishing a Task in the Background
    Background Task Identifier
    Expiration Handler
    Completing the Background Task
    Implementing Background Activities
    Types of Background Activities
    Playing Music in the Background
    Summary
    18 Grand Central Dispatch for Performance
    The Sample App
    Introduction to Queues
    Running on the Main Thread
    Running in the Background
    Running in an Operation Queue
    Concurrent Operations
    Serial Operations
    Canceling Operations
    Custom Operations
    Running in a Dispatch Queue
    Concurrent Dispatch Queues
    Serial Dispatch Queues
    Summary
    19 Using Keychain and Touch ID to Secure and Access Data
    The Sample App
    Setting Up and Using Keychain
    Setting Up a New KeychainItemWrapper
    Storing and Retrieving the PIN
    Keychain Attribute Keys
    Securing a Dictionary
    Resetting a Keychain Item
    Sharing a Keychain Between Apps
    Keychain Error Codes
    Implementing Touch ID
    Summary
    20 Working with Images and Filters
    The Sample App
    Basic Image Data and Display
    Instantiating an Image
    Displaying an Image
    Using the Image Picker
    Resizing an Image
    Core Image Filters
    Filter Categories and Filters
    Filter Attributes
    Initializing an Image
    Rendering a Filtered Image
    Chaining Filters
    Feature Detection
    Setting Up a Face Detector
    Processing Face Features
    Summary
    21 Collection Views
    The Sample App
    Introducing Collection Views
    Setting Up a Collection View
    Implementing the Collection View Data Source Methods
    Implementing the Collection View Delegate Methods
    Customizing Collection View and Flow Layout
    Basic Customizations
    Decoration Views
    Creating Custom Layouts
    Collection View Animations
    Collection View Layout Changes
    Collection View Layout Animations
    Collection View Change Animations
    Summary
    22 Introduction to TextKit
    The Sample App
    Introducing NSLayoutManager
    Detecting Links Dynamically
    Detecting Hits
    Exclusion Paths
    Content Specific Highlighting
    Changing Font Settings with Dynamic Type
    Summary
    23 Gesture Recognizers
    Types of Gesture Recognizers
    Basic Gesture Recognizer Usage
    Introduction to the Sample App
    Tap Recognizer in Action
    Pinch Recognizer in Action
    Multiple Recognizers for a View
    Gesture Recognizers: Under the Hood
    Multiple Recognizers for a View: Redux
    Requiring Gesture Recognizer Failures
    Custom UIGestureRecognizer Subclasses
    Summary
    24 Accessing the Photo Library
    The Sample App
    The Photos Framework
    Using Asset Collections and Assets
    Permissions
    Asset Collections
    Assets
    Changes in the Photo Library
    Asset Collection Changes
    Asset Changes
    Dealing with Photo Stream
    Summary
    25 Passbook and PassKit
    The Sample App
    Designing the Pass
    Pass Types
    Pass Layout—Boarding Pass
    Pass Layout—Coupon
    Pass Layout—Event
    Pass Layout—Generic
    Pass Layout—Store Card
    Pass Presentation
    Building the Pass
    Basic Pass Identification
    Pass Relevance Information
    Barcode Identification
    Pass Visual Appearance Information
    Pass Fields
    Signing and Packaging the Pass
    Creating the Pass Type ID
    Creating the Pass Signing Certificate
    Creating the Manifest
    Signing and Packaging the Pass
    Testing the Pass
    Interacting with Passes in an App
    Updating Passes Automatically
    Summary
    26 Debugging and Instruments
    Introduction to Debugging
    The First Computer Bug
    Debugging Basics with Xcode
    Breakpoints
    Customizing Breakpoints
    Symbolic and Exception Breakpoints
    Breakpoint Scope
    Working with the Debugger
    Instruments
    The Instruments Interface
    Exploring Instruments: The Time Profiler
    Exploring Instruments: Leaks
    Going Further with Instruments
    Summary
    Index

沒有留言:

張貼留言

歡迎網友的交流與分享,謝謝。