Learning WatchKit Programming: A Hands-On Guide to Creating Apple Watch Applications

Book description

Create Breakthrough Apple Watch Apps with the WatchKit Framework

With its Apple Watch and WatchKit framework, Apple is challenging developers to build exciting and innovative apps for Apple Watch. iOS developers who master Apple Watch programming now will have the same huge “early mover” advantage that early iPhone developers enjoyed. Learning WatchKit Programming is a complete, hands-on tutorial for all iOS developers who are ready to design and build tomorrow’s hottest new wearable apps.

Leading iOS development trainer and author Wei-Meng Lee covers all of the fundamentals of Apple Watch development and the WatchKit API, from application architecture and design to navigation, notification, and glances. Using practical Swift code examples designed for clarity and simplicity, Lee guides you through building apps from the ground up and shows you how to integrate those apps with the iPhone for expanded capabilities.

The perfect companion to other mobile development books in the Learning Series, this guide helps you extend your iOS skills to a whole new environment, build apps that solve a new set of problems, and reach millions of people in the new Apple Watch marketplace

Coverage includes

  • Getting started quickly with WatchKit and Apple Watch development

  • Storyboarding apps and testing them on the Apple Watch Simulator

  • Mastering Apple Watch’s multiple-screen navigation

  • Building highly efficient interfaces with Apple Watch UI controls

  • Customizing each screen’s look and feel, and passing data between them

  • Responding to user interactions via buttons, switches, sliders, or Force Touch

  • Displaying information via labels, images, or tables

  • Communicating between an Apple Watch app and its containing iOS app

  • Calling web services from Apple Watch

  • Displaying short- and long-look notifications

  • Customizing notifications to display your message’s essence more quickly

  • Implementing glances to give users a faster way to gather information

  • Localizing your Apple Watch apps

  • All of this book’s sample Swift code is available for download at informit.com/title/9780134195445.

    Table of contents

    1. About This eBook
    2. Title Page
    3. Copyright Page
    4. Dedication Page
    5. Contents at a Glance
    6. Contents
    7. Preface
      1. What You’ll Need
      2. How This Book Is Organized
      3. About the Sample Code
        1. Getting the Sample Code
      4. Contacting the Author
    8. Acknowledgments
    9. About the Author
    10. 1. Getting Started with WatchKit Programming
      1. Specifications of the Apple Watch
      2. Getting the Tools for Development
      3. Understanding the WatchKit App Architecture
        1. Deploying Apple Watch Apps
        2. Interaction between the Apple Watch and iPhone
        3. Communicating with the Containing iOS App
      4. Types of Apple Watch Applications
      5. Hello, World!
        1. Creating an iPhone Project
        2. Adding a WatchKit App Target
        3. Examining the Storyboard
        4. WatchKit App Lifecycle
        5. Modifying the Interface Controller
        6. Running the Application on the Simulator
      6. Summary
    11. 2. Apple Watch Interface Navigation
      1. Interface Controllers and Storyboard
        1. Lifecycle of an Interface Controller
      2. Navigating between Interface Controllers
        1. Hierarchical Navigation
        2. Page-Based Navigation
        3. Passing Data between Interface Controllers
        4. Customizing the Title of the Chevron or Cancel Button
        5. Navigating Using Code
        6. Presenting a Series of Pages
        7. Changing the Current Page to Display
      3. Summary
    12. 3. Apple Watch User Interface
      1. Responding to User Interactions
        1. Button
        2. Switch
        3. Slider
      2. Displaying Information
        1. Labels
        2. Images
        3. Table
      3. Gathering Information
        1. Getting Text Inputs
        2. Getting Emojis
      4. Laying Out the Controls
      5. Force Touch
        1. Displaying a Context Menu
        2. Adding Menu Items Programmatically
      6. Summary
    13. 4. Interfacing with iOS Apps
      1. Localization
        1. Localizing the User Interface
        2. Creating Localizable Strings
        3. Using the Date Control
      2. Communicating between the WatchKit App and the Extension
        1. Location Data
        2. Displaying Maps
        3. Accessing Web Services
        4. Sharing Data
      3. Summary
    14. 5. Displaying Notifications
      1. What Is a Notification?
      2. Types of Notifications on the Apple Watch
        1. Implementing the Short-Look Interface
        2. Implementing the Long-Look Interface
      3. Summary
    15. 6. Displaying Glances
      1. What Is a Glance?
        1. Implementing Glances
        2. Customizing the Glance
        3. Testing the Glance
      2. Making the App Useful
        1. Creating a Shared App Group
        2. Implementing Background Fetch
      3. Updating the Glance
      4. Summary
    16. Index
    17. Code Snippets

    Product information

    • Title: Learning WatchKit Programming: A Hands-On Guide to Creating Apple Watch Applications
    • Author(s): Wei-Meng Lee
    • Release date: June 2015
    • Publisher(s): Addison-Wesley Professional
    • ISBN: 9780134195537