After adding the Apple Watch support to our infamous Radio Apps, I would like to share some of my experiences developing on this new platform and the hurdles I encountered.
Adding WatchKit App to Your Project
In order to add Apple Watch support to your app, you will need to learn the new framework called WatchKit. Essentially, the watch interface is built off the WatchKit SDK. Adding the Watch target is pretty straight forward in Xcode.
1) From the Xcode menu, select File > New > New Target
2) In the template chooser, pick iOS > and navigate to the Apple Watch section
3) Select WatchKit App
4) If you plan to implement a glance or custom notification interface, select the appropriate checkboxes.
Xcode configures the targets for your WatchKit app and WatchKit extension and adds the needed files to your iOS project. The bundle IDs for both new targets are configured automatically, based on the bundle ID of your iOS app. The base IDs for all three bundles must match.
Mobile vs Wearable
The Apple watch is referred to as a wearable device where the operational aspect of its apps should be inherently different from applications designed for mobile devices like the iPhone. Apple watch apps shouldn’t merely copy all functionalities from its parent app. The watch app should complement its parent app rather than replicate all functionalities just so they are available in a smaller form factor.
– Storyboards only. The watch user interface can only be built via storyboards. All the xib lovers will need to suck it up and go this route.
– WatchKit apps require an iPhone to function. When implementing Apple watch applications, all storyboard files for the watch app are copied to the watch device; however, the code to update the Watch ui is loaded to the phone as an extension (similar to the Extensions feature introduced in iOS 8). Stand alone native watch application is coming this fall according to rumours, but we will see soon enough at WWDC 2015.
– Limited API access. Since the WatchKit app mainly works along the iPhone, there is no API to access the hardware sensors on the device.
– Lack of certain controls. All the watch UI elements are new and some of those traditional iOS controls are not available. This problem is understandable as we are dealing with a totally new paradigm with very limited real estate. However, there are certain controls like the Audio Volume (especially important for a radio app) that have not been added to the SDK, making the app less useful in some cases.
– Layout. Unfortunately, there is no AutoLayout support. The WatchKit Storyboard does the on-screen layout automatically for you. I was hoping I could move some controls and overlay them on top of an album art image but it didn’t work. Also, there are several layout rules that we need to get accustomed to. For example, Apple introduced a new layout component called Group where controls can be placed within the group.
– Navigation. There are two ways to navigate between views within a watch application. Hierarchical (like navigation on iOS device) vs Page (navigate between pages by swiping left and right) base model. Unfortunately, there is no way to combine the two models. Developers will need to make a decision ahead of time and stick with it for the entire app.
In conclusion, I was disappointed by many limitations imposed by the Apple Watch SDK and its features; however, there is no reason why developers shouldn’t add the watch support to their app now and get excited for the opportunity this new platform will bring us in the future. Despite the lack of features, the watch app implementation cycle isn’t too long and developing on WatchKit is relatively straight forward. Because Apple is launching the WatchKit framework in a very conservative fashion, there is no doubt that things will drastically evolve in future releases when Apple has more time to flush out the platform.
I hope you found this article useful. If you are looking to develop your own Apple Watch app but don’t have the time or expertise, contact our sales team at email@example.com and I will be glad to talk to you more about it