Sponsored By

Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs.

Three Things We’ve Learned from Developing for the Apple Watch

Over the past few weeks we have been fortunate enough to have been given a fantastic Apple Watch project by one of our existing clients. In this post I'll run over three things we learned from developing for WatchOS 2

James Foreman, Blogger

September 30, 2015

6 Min Read

Three Things Weve Learned from Developing for the Apple Watch

What We Did

Over the past few weeks we have been fortunate enough to have been given a fantastic Apple Watch project by one of our existing clients. The focus of the work has been to convert the product from WatchOS 1 to WatchOS 2 and then to exploit many of its attendant features.

From our previous blog you may recall that the most salient improvement from WatchOS 1 is that Watch applications can now run natively, instead of all the heavy-lifting being done on the iPhone and the results of this being transferred to the watch by a limiting, invisible umbillical.

Some observable benefits of this are that touches to the Watch are responded to more quickly, but more importantly, it means that the iPhone does not need to be present when running an app.

How We Did It

The Tools

For anyone converting an app, the first stage of the process involves downloading WatchOS 2 beta onto the Watch and installing the XCode 7 beta libraries. Overall, we found the beta libraries to be a mixed and sometimes fraught experience. Often the devices would fail to communicate with each other reliably and we would spend hours unpairing and pairing the devices to solve this. As the beta releases continued (there were 6) we found that things improved overall.

The Conversion Process

Apple changed the API for communicating between watch and phone, so the first stage of the conversion process involved understanding how the old system worked and how its replacement will work. Luckily, the principle is largely the same and developers should have no real issue with this. We located many tutorials that dealt with this in some detail for both Objective-C & Swift implementations.

In WatchOS 1, data is shared between watch and phone using a notion called Shared Groups. What this means is that both devices can implicitly access the same data as if it were natively stored on each device. The reality is that the data is stored on the phone and the watch communicates wirelessly to access the data. In WatchOS 2, this no longer exists and each device has its own file system. Therefore, if data is to be shared then there has to be some form of protocol in place for explicitly accessing this data. This might seem like a loss of functionality, but in reality the data can quite easily be accessed by sending a few messages between devices. The new APIs provide a form of guaranteed messaging, so it’s all very civilised. And not having to be tethered to the iPhone means the app can have more independent features.

Extra Features

We have had a chance to explore some of the new WatchOS 2 features in some detail. Complications are the little gizmos that appear on the watch-face that provide some useful information to the wearer. Apple now allows your watch apps to customise these. They come in various shapes and sizes and can be a mix of text and images. Creating these is pretty straight-forward and you can also vary their content based on an idea called Time Travel; when the user turns the digital crown of the watch, the time moves backwards or forwards, so your complications can reflect the state of your app at that point.

We also took a look at the CoreMotion & HealthKit features of the watch. You can now use your watch as a pedometer and track the number of steps you have taken and your step-rate over time. You can do this in the absence of the iPhone and have it all neatly synchronise with HealthKit when the watch gets back in range. Overall, we found the step-counting feature to be variable in terms of accuracy and a little laggy. Investigation appears to indicate that it’s more useful for larger, more macroscopic exercise sessions rather than recognising snappy, individual steps.

Overall Impression

Working on our first app for Apple Watch was a very positive experience. There was an initial setback with the beta libraries and tools which was overcome by programmer grit and determination. The official releases of WatchOS 2, iOS 9 and final development tools will remove this obstacle very shortly. We firmly suspect that the vast majority of iOS games in the months to come will feature an accompanying watch app to add convenience and value to the product. If nothing else, it will be easier to get an Apple feature if your iOS app supports watch.

One thing that we’ve learned from working with Apple Watch is that the whole product is incredibly focused in the features that it offers the user. The device is not just a general-purpose computer for your wrist. It looks like Apple has paid considerable attention to the information you might want to see at any given time and how that fits in with the overall Apple ecosystem. At this point, if you want to make games for Watch you have to play by its rules.

As the product matures however, the software improvements to the existing watch hardware will continue in a similar fashion, with more native functionality being placed on the watch. Even with WatchOS 2, access to more sophisticated user-interfaces provided by UIKit are missing, although developers have hacked a solution to this already. From a games perspective, access to lower-level graphics libraries would also be a boon. Once again, the developer community demonstrate that some of this is possible already.

Created on behalf of Tag Games

Read more about:

2015Featured Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like