Designing Apps For watchOS

The Apple Watch is one of Apple’s newest development platforms, and the realities of the hardware as well as the nature of how a user uses a watch make it very different from developing for iOS or macOS. Much like iOS, watchOS quickly moved away from the development model that was introduced at launch. The iPhone launched without the App Store or UIKit, and developers were essentially told to make web apps. It only took one year for that plan to go out the window, with Apple introducing the iOS SDK for native apps, which has had a huge impact on the success of the iPhone.

With watchOS 1, Apple’s application model really treated the watch as a remote terminal. Building apps for the Apple Watch really meant building an extension of your iPhone app which would run on the iPhone but display on the watch. The inevitable outcome of this strategy was obvious even before developers started making apps, as there’s simply too much latency introduced when controlling the UI on one device connected via Bluetooth to another device that is actually executing code.

Fortunately, this app model was thrown out even more quickly than the original iPhone’s model of using web applications. The first Apple Watch was released in April of 2015, and two months later at WWDC Apple announced that watchOS 2.0 would support native apps when it launched in September of that year. Of course, supporting native apps was not a silver bullet to fix the issues with applications being slow and performing poorly, which should have already been clear based on Apple’s own applications suffering those same issues at times. However, moving away from the pure extension model did help to improve performance, especially when combined with the new application caching in watchOS 3.0. Essentially, the changes in the application model since the initial release have moved much of the burden for performance improvements onto the hardware, and I’ve already mentioned how much faster the whole experience is on Apple’s new dual core SiPs with their improved GPUs.

Having experience with iOS and Android development, and having been exposed to WatchKit by making our watchOS display testing application, I thought I’d share some of my thoughts on watchOS as a platform for developers. I'm not going to talk much about the API itself, as it wouldn't really make sense for anyone who isn't an existing iOS developer, and anyone who is doesn't need me to give them a watered down half page summary of things they can read in the developer docs. The only thing I will say is that Apple's main competition is an OS where the developer API is in pure C, so from an implementation perspective even the original system for making watchOS apps was years ahead of the competition.

One of the main things I found interesting about developing for watchOS is how interfaces are designed. In hindsight, the original decision to used fixed layouts for iPhone applications was an incredibly shortsighted and poor choice. No doubt many users remember letterboxed applications on the iPhone 5 due to fixed 3:2 layouts being shown on a 16:9 display, and even now there are iPhone apps and iPad apps that have to be upscaled to work on larger modern devices even if the aspect ratio matches, because their interfaces were designed for a single resolution.

The Apple Watch puts Apple in an interesting position. On one hand, they don’t really need to worry about people’s wrists getting larger, and so the size of the display isn’t going to change significantly. On the other hand, there needs to be some room to change things if needed in the future, and the Apple Watch already comes in two sizes with two different resolutions, which means there’s more variety in the displays now than there was for the first three years of iOS devices. The solution Apple has settled on is somewhere between the fixed layouts of early iOS applications, and the pure constraint-based layouts of modern iOS applications that use Auto Layout.

When positioning the UI elements in an Apple Watch application, you essentially get to choose the horizontal and vertical alignment, along with some attributes related to the size. You can set a fixed size, but this is generally only a good idea for images and other bitmaps where there really is an intrinsic size. For other situations, it’s best to just let the system size a control to fit the content, or if setting it directly, by sizing it relative to the size of the container to avoid the pitfalls of hardcoded sizes should the resolution or size of the display change in the future. Apple also provides groups, which allow you to divide the screen into sections that other controls can be positioned within. This can be helpful when trying to align something in a way that the standard top/left/right/bottom/center options for positioning relative to the entire screen don’t accommodate for, while still making a layout that works independently of the display size and resolution. On the right side of the image above you can see a case where the screen is split into two containers and objects are aligned relative to that.

Another interesting thing about UI design on the Apple Watch is that layouts have implicit vertical scrolling. Vertical scrolling has always been needed on mobile devices due to the limited space available, but this has always been something that you have to actively implement, generally through the use of a UIScrollView or the more structured UITableView and UICollectionView classes. Most mobile applications make use of these, even apps like the iOS weather application where the customization of the cells is so heavy that you don’t even see the UI as being a table. However, if you do not make use of these, the interface will not automatically allow for scrolling if you position views off the edge of the display.

Because the amount of space on the Apple Watch is so limited, Apple essentially treats every screen like a scrolling view if needed. A standard TableView API is provided for cases where you actually want to structure things in table form, but for all other cases you can simply place as many elements stacked vertically as needed to construct the interface, and the system will make it scrollable if needed. Xcode’s Interface Builder also makes this fairly obvious by extending the size of the preview to indicate that they can’t fit within the standard area. In addition to vertical scrolling on a screen, the process of implementing paging so users can swipe horizontally between screens involves zero lines of code and can be done within a few seconds in Interface Builder.

Of course, not everything about the watchOS interaction model is perfect. As I mentioned earlier, Force Touch often ends up being a way to implement mystery menus that the user won’t discover naturally. As long as you follow Apple’s guidelines of using Force Touch to implement navigation between sections or contextual commands you’ll generally be okay once users discover how Force Touch works in your app, but that doesn’t solve the problem of users having to consciously Force Touch in every single new app just to figure out if it’s implemented, and what function it performs if it is. The very nature of using Force Touch to bring up these menus leads to this situation, as there are no visual cues that allow the user to discover the menu through other means. This may just be one of the limitations when adding functionality to a device with such a small amount of space on the screen, but I still feel that there has to be a better solution than this.

Despite my misgivings about Force Touch introducing menus with poor discoverability, the interface and interaction models for watchOS are generally well suited to the Apple Watch’s small screen. Apple essentially gives you scrolling and paging views for free, which removes a ton of overhead that would exist if developers had to implement full TableView classes with their data source and delegate objects, and separate page view controllers to manage groups of Interface Controllers. The layout system itself also gives developers sufficient control over the placement of objects on the screen, while also being flexible enough to scale to both sizes of the Apple Watch, and any future watchOS devices that may come in new sizes or resolutions.

watchOS 3.0: Health and Fitness Final Words
Comments Locked

126 Comments

View All Comments

  • wumpus - Wednesday, December 21, 2016 - link

    Can you program it at all?

    All I need a "smart watch" to do:
    Start/stop a run tracking app.

    Optional extras (biggies):
    display time elapsed during run
    cycle between time/heart rate/pace
    show current time when not running (especially if insufficiently clunky)
    display phone number/name of whose calling

    I might find other apps after purchase, but those are the issues I need. Pebble was launched primarily on runkeeper integration, but failed hard (especially hard is the start/stop functionality: being able to lock your phone and put it in your pocket would be key.
  • michael2k - Tuesday, December 20, 2016 - link

    By that measure, why buy an iPhone when you've got $400 laptops and $99 Android phones?
  • sadsteve - Tuesday, December 20, 2016 - link

    Heh, I didn't buy an iPhone. My new laptop was $650 (had separate graphics card with 2GB memory) and my Android phone was only $29.
  • Ratman6161 - Tuesday, December 20, 2016 - link

    You are asking the wrong question :). The question (for people who already own iPhones) is why buy the watch when I already own the iPhone? Keeping in mind the reviewer makes a fairly extensive case to say that the watch is an extension of the phone and not a stand alone device. So the question is, what does the watch add to the overall picture? By the way, I'm a Samsung phone user (Note 5) but I'm not buying the Samsung watch either.
    So what does it add to the experience? What I'm mostly interested in is fitness tracking. I could see how such a thing, or a fit bit etc could be helpful to someone just getting started. But for those of us who have been at it (fitness) for a while - going on 20 years for me - all I need is a simple heart rate monitor and I don't even use that all the time. After a while you get to know what a certain heart rate feels like based on breathing and don't really need the readout except as an occasional check. On my bike, I need speed, distance and cadence in addition to hear rate. Speed and distance could be calculated from GPS data but cadence (rotations per minute of the crank arms) has to come from a sensor on the bike. The racers and others more hard core than me also measure their power output. I don't see anything like a smart watch being able to really replace a specialized bike computer.
    I also don't want one expensive device that isn't useful without also having a different expensive device.
  • Ratman6161 - Tuesday, December 20, 2016 - link

    PS: OK, I know this is a personal bias. But my first thought when I saw the picture at the beginning of the story was "it looks like a cartoon".
  • Cliff34 - Wednesday, December 21, 2016 - link

    Personally, I don't need all the data to track speed, HR and distance. I used to do triathlon and thos things matter bc I need to know how far and fast I am training.

    But for the everyday user, where fitness is more for health reasons rather than athletic performance, it is a bit over kill.

    Sure you can be the data geek to find out and graph how much training you've been doing. But the data is more to show than for actual athletic improvement.

    During my triathlon era, we often joke that the time we spent tracking and 'analyzing' our data can be better spent putting in more hours to get the body fitter (and faster).

    Right now, i am not training to race now. So i just run or exercise however I feel like it. The only data i track is my time and that you don't need any fancy gadgets.
  • rhysiam - Wednesday, December 21, 2016 - link

    While I agree that all the fitness tracking features are "a bit overkill", in the end of the day loads of people find them helpful. It's not really about the tracking data, it's about the reward system such data makes possible. From a psychological perspective, gaining rewards, however trivial, ultimately reinforces our behaviours. There is a whole industry of repetitive, reward based games that tap into this (Pokemon GO being the most successful example of late).

    Fitness trackers, settings goals, gaining rewards, etc., are mostly based on a similar behaviour -> reward -> behaviour loop. While I'm sure we'd all love to be entirely self motivated and not require any external rewards, in the end of the day if those things help some people get up and active instead of hitting the snooze button again, or just staying in front of a screen, who really cares?
  • Flunk - Tuesday, December 20, 2016 - link

    Not that many people do, Apple controlled a shrinking 11.7% of the smartphone market as of Q2 2016.

    IDC: http://www.idc.com/prodserv/smartphone-market-shar...
  • KoolAidMan1 - Thursday, December 22, 2016 - link

    And yet they still dominate app revenue, mobile ad revenue, mobile internet traffic, and smartphone profits.

    Whoever is buying those iPhones is using them a hell of a lot more than whoever is buying whatever else is out there, that much is clear.
  • jospoortvliet - Sunday, December 25, 2016 - link

    I would guess this has something to do with the big 'installed base' and longer life cycle for iPhones. Also because their owners are more likely to be well off (iPhone markets hare is higher in the us than India or afrika -- surprise).

    And absolute sales is the decreasing, relative sales is. There is a shift, though, with some countries selling very few iPhones to the point where local app development for Apple becomes less of a priority (Spain is an example). This is of course a risk for Apple- if they loose their spot of top app development target or even become not-a-target they will fall in a vicious circle of people not buying their device especially for lack of apps and developers not developing for lack of users. They are not there yet is most of the world but in some regions, as I said- getting close.

Log in

Don't have an account? Sign up now