In WWDC 2015, Apple announced watchOS 2 for Apple Watch and new version WatchKit. This is a serial to show you how to work with them. Because the OS and SDK will be updated till they’re released late this year, the content in the blog will be changed accordingly.
The unchanged is the seperation of two bundles: Watch app and the WatchKit extension. The Watch app shows the interface and WatchKit extension contains logic codes. There are several new UI elements in WatchKit which we will talk about later.
The main change in architecture is where the WatchKit extension lives. In watchOS 1, the extension is contained in the counterpart iPhone app. While in watchOS 2, the exension is moved to Watch app running natively in Apple Watch. So the relation between Watch app and iPhone app is changed from kind of “client-server” to peer to peer.
Figure 1-1 Architectures in watchOS 2 and watchOS 1(From [watchOS 2 Transition Guide](https://developer.apple.com/library/prerelease/watchos/documentation/General/Conceptual/AppleWatch2TransitionGuide/index.html))
This change bring impacts on different use cases. We will talk about the details in articles coming next.
Basically, the impact on starting a new project in Xcode is that you need to select different items when adding watch target.
Figure 1-2 target for watchOS 1
Figure 1-3 target for watchOS 2
If you want to support both watchOS 1 and watch OS 2, you need to add both targets.
Figure 1-4 Code structures