What this book covers
Chapter 1, Introducing the Swift Programming Language, focuses on how to go about signing up to the Apple Developer program, as well as downloading and installing the Xcode development tools. We will cover Xcode playgrounds before moving on to learning the basics of the Swift programming language and some of the new additions to Swift with Swift 2.
Chapter 2, Understanding Apple Watch, introduces you to the WatchKit platform architecture and the application life cycle, as well as a list of the WatchKit classes that make up the WatchKit platform. You'll learn about some of the limitations behind the WatchKit platform architecture, as well as some of the new additional features that are a part of watchOS 2. You will then go on to learn about the Apple Watch Human Interface Guidelines.
Chapter 3, Exploring WatchKit Controls, introduces you to some of the controls that come as a part of the WatchKit platform. You will learn how to work with Xcode's Interface Builder to build the visual interface for our first WatchKit application. You will also learn how to use Outlets to bind objects to the Interface Builder objects and create some Action events to respond to these objects when tapped by the user to provide visual feedback.
Chapter 4, Using the Core Location and Watch Connectivity Frameworks, delves deeper into learning more about the WatchKit framework and the new layout system using groups. You'll learn about the MapKit and WKInterfaceMap
frameworks. You will also learn how you can use these to incorporate mapping capabilities within your WatchKit apps using the Watch Connectivity framework to send geographical location-based coordinates between your iOS app and WatchKit to display the user's current location on the Apple Watch.
Chapter 5, Navigating Around in WatchKit, introduces you to some of the ways that you can navigate within the watch face user interface. You'll learn the differences between page-based, modal, and hierarchical navigation, and when to use them. You will then learn how to use the HealthKit framework to access health-related information and share this information between the iOS device and the WatchKit extension to display a user's current heart rate, blood type, and number of steps taken for a particular day.
Chapter 6, Implementing Tables within Your App, focuses on teaching you how to create applications that handle Apple Pay payments using the PassKit framework. You will learn how to pass information between the iOS device and the WatchKit extension. You will also learn how to use the WKInterfaceTable
controller, how to set it up and configure it, as well as how to display information from a JSON file.
You will learn how to use the WKInterfaceTable
methods to determine when a row has been selected by the user and respond to this action.
Chapter 7, Adding Menus to Your App, introduces you to WatchKit menus, and how you can incorporate them into your own applications, as well as respond to them based on what the user has chosen. We end the chapter by covering how you can use the Taptic Engine to integrate haptic feedback in your own applications.
Chapter 8, Incorporating the Glance Interface in Your App, shows you how to effectively incorporate WatchKit glances within an existing WatchKit application by creating a custom GlanceInterfaceController
class to display information within the glance interface. You'll learn about the glance interface guidelines, which outline the guidelines and principles that you need to follow when designing your layouts for the different Apple Watch screen sizes.
Chapter 9, Incorporating Notifications within Your App, explains how to incorporate and configure local and remote notifications within an existing Apple Watch application. You will learn about the notifications life cycle and the differences between static and dynamic interfaces.
You will learn about the Apple Push Notification service (APNs) and how you can use this to send and receive information by responding to button actions when a user taps on the button. You will learn about the notification interface guidelines, which outlines the guidelines and principles that you need to follow when designing your notifications.
Chapter 10, Image Compression and Animation, shows you how to add images to the image assets catalog, and then start to build a simple WatchKit application that showcases how to animate a series of images within the WatchKit user interface.
You'll learn about the Application Transport Security (ATS) protocol that Apple introduced with the release of iOS 9, which forces developers to provide secure connections between your Apple Watch apps that communicate over HTTPS. We will also be covering how to properly configure our Apple WatchKit extension, as well as learn the best ways of handling and compressing large image files when these are downloaded from an external website so to increase performance.
Chapter 11, Packaging and Deploying Your App, focuses on how to submit your application to the Apple App Store, and share your creations with the rest of the community. You'll learn how to set up your iOS development team as well as the development and distribution certificates.
Finally, you will learn how to use the Instruments application to profile your application to eliminate performance bottlenecks. You will also learn how to package your application using Xcode and deploy this to iTunes Connect so that you can download and test on your Apple Watch device.