Between watchOS 1 and watchOS 3 there's been some very significant changes that affect how you develop your code. Steve explains the evolution of watchOS and why it is so important to know the difference between versions.
- [Instructor] The three versions of Apple Watch have gone through some radical differences in architecture. Let's look at how these three parts are organized. To give us some context about the current architecture, let's look at the three versions of watchOS and see how watchOS has changed over time. In Apple's first iteration of the watch, it had no watchOS. Instead, they added a framework to iOS called WatchKit. WatchKit contains the user interface elements of watchOS and thus, watchOS will often be called WatchKit.
WatchKit adds two more targets to the application, the WatchKit App and the WatchKit Extension. The Watch Extension was not on the watch, but on the phone, along with the phone app. And the Watch App was the only thing on the watch. For a Watch application to work required Bluetooth to communicate any changes from the Watch App, like a button press, to the extension on the phone back to the watch, then the extension would again communicate with the Watch Kit app to make changes to the interface. This made for some very slow applications.
The watch had three ways to give you information, applications, notifications, and glances. Notifications were the same notifications you get on your phone. If the phone is in sleep mode, the watch picks up the notification and displays it instead of the phone displaying it. Glances were quick single views that you could access by swiping up on your watch face. With watchOS 2, one major change helped with speed. Apple moved the extension onboard the watch. Now all of your application was truly on the watch and there was a much smaller lag between instructions on the watch.
It look longer for watch apps to load, since they were bigger in size. Apple also added one way for developers to interact with users. Complications. Complications are the small informational items on a watch face not telling you the hours, minutes, and seconds. Clicking on a complication took you to an application as a fast launch method. The fastest watchOS yet is watchOS 3. While WatchKit and watchOS 2 had a single third-party app running, Apple changed the architecture of the watch to handle several apps running in the background.
The change led to a removal of glances and replacing them with a dock of frequently used applications, so your favorite applications start up almost instantly. Applications in the dock update themselves in the background without any user interaction. While WatchKit's first iteration left much to be desired, watchOS give you, as a developer, a robust platform for developing applications for the Apple Watch.
- Breaking down the parts of a watchOS app
- Building an interface
- Adding and scaling images
- Adding navigation
- Playing audio and video
- Connecting objects to code
- Writing watchOS code
- Working with tables
- Programming notifications
- Working with complications