Building Apple Watch Projects
上QQ阅读APP看书,第一时间看更新

Chapter 2. Hello Watch

Time to fire up the engine and get a feel for some of the new tools we have at our disposal, courtesy of Apple's Xcode development environment. Once we get started, you will recognize much of what you already know through using Xcode and Swift to build apps for iOS, whether for iPhone, iPad, or universal apps for both. The project structure will be familiar to you, and everything that you would expect to see in a purely iOS project will be present.

If you have so far been developing for OS X and not iOS, you will notice many similarities but also many differences to an OS X project. Not a problem. You know Swift already, we will be setting up the projects step by step, and we are all new to WatchKit.

Briefly, we will learn how to do the following:

  • Start and set up a project using an Xcode template
  • Create some UI elements
  • Get the app running on the Watch Simulator
  • Add some simple animation to the UI
  • Get basic input from the user

By the end of this chapter you will be looking at a simple but functioning WatchKit app, installed and running on the Watch simulator.