ÜberSchnell: a one-tap Apple Watch shopping experience

A few months ago we built the first version of ÜberSchnell at the ecomhack 2015. ÜberSchnell is a one-tap shopping experience for fast-moving consumer goods (FMCG). The app enables users to buy products from their smart watch, based on their location, with a single tap of their Apple Watch.

Even back then we planned using Contentful for configuring the connection between beacons and products effortlessly. Since we are also building the second version of our iOS SDK right now, a rewrite with a better API and support for the upcoming watchOS 2.0, it made sense to release an updated version of ÜberSchnell as a native Apple Watch application.

ÜberSchnell workflow

The vendor pre-configures the beacons to be associated with a specific product, so that a visitor can instantly buy it, being in proximity of that beacon. The vendor could then send the beacons to the customer's house, and they would place them in different rooms: say, a laundry detergent beacon in the laundry room, a shampoo in the bathroom, wine in the living room and a fruit basket in the kitchen. Since then each product can be bought anytime – in just one tap.

The inspiration for ÜberSchnell came from the Amazon Dash Button.

commercetools integration

commercetools powers the e-commerce part of app. Since there is no official Swift SDK available, we created our own incomplete one. It implements access to the product data, as well as creation of carts and orders. It makes some simplifying assumptions, but nonetheless it should be a good start for building apps with commercetools.

To configure the connections between products and beacons, we needed the product data to be available in Contentful as well. For that purpose we created an import script, which imports parts of the product data into an entry in Contentful. Among these is the commercetools ID, which allows the app to aggregate data from both APIs together. This import process enables augmenting product data with additional content in Contentful.

Implementation

Updating the app to watchOS 2.0 should have been an easy process, as Xcode 7 automatically converts existing targets to the new type. The architecture of Watch apps did not change, but making them native involved moving the existing WatchKit extension from the phone to the watch itself, eliminating the Bluetooth communication which made watchOS 1.0 apps so slow.

There is one big change, though: previously it was possible to communicate directly with the parent iOS app via +openParentApplication:reply: to send dictionaries with data back and forth. This has been replaced with the new WatchConnectivity framework, in which the WCSession class is used to explicitly send messages or files between an iPhone and Watch app.

The main reason for communication in ÜberSchnell is for payments, as the PayPal SDKs cannot run on the watch and the necessary passwords prompts also can't be done there. The user preauthorizes purchases in the phone app, while tapping a product on the watch commits the transaction by telling the phone to do that, because the necessary data never leaves the phone.

Unfortunately, watchOS 2.0 apps have been a rather unstable part of the XCode 7 beta, where problems reached from not being able to debug on the device to various code signing issues with watchOS frameworks. Most notably, there's also a bug regarding using the same name for an iOS and watchOS framework, which breaks archiving apps. The workaround for that is giving each of them a different name.

Conclusion

Of course, you can also have a look at the full source code of the app on Github to see how we built the rest of it.

Blog posts in your inbox

Subscribe to receive most important updates. We send emails once a month.