Top Banner
Software Development Done Right See the time on your wrist 1 June 4th, 2015 Lammert Westerhoff Jeroen Leenarts
22

See the time on your wrist - Apple Watch presentation

Aug 12, 2015

Download

Mobile

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: See the time on your wrist - Apple Watch presentation

Software Development Done Right

See the time on your wrist

1

June 4th, 2015

Lammert Westerhoff Jeroen Leenarts

Page 2: See the time on your wrist - Apple Watch presentation

Who are we?Lammert Westerhoff - iOS Developer at Xebia - Currently at NS

Jeroen Leenarts - iOS Developer at Xebia - Founder Stichting CocoaHeadsNL - Currently at ING CB

2

Page 3: See the time on your wrist - Apple Watch presentation

• Introduction • Design • Data Transfer

3

Page 4: See the time on your wrist - Apple Watch presentation

Three components

4

Notifications Glances

10:09MOVE

Activity

EXERCISESTAND

Watch Apps

AM PM

Cancel Set

12 1

2

3

4

567

8

9

10

11

0 00:

https://developer.apple.com/watch/human-interface-guidelines/app-components/

Page 5: See the time on your wrist - Apple Watch presentation

5Not possible to mix

hierarchicalpage-basedWatchKitNo native watch apps Limited UI possibilities - No drawing, static only - Only standard elements like labels,

images - Either page-based navigation or

hierarchical

https://developer.apple.com/watch/human-interface-guidelines/app-components/

Page 6: See the time on your wrist - Apple Watch presentation

Designing a Watch App for the XebiCon Schedule app

6

Page 7: See the time on your wrist - Apple Watch presentation

XebiCon app for iPhone

7

Page 8: See the time on your wrist - Apple Watch presentation

Design for Apple Watch

8

Don’t do a design like this

Page 9: See the time on your wrist - Apple Watch presentation

Why did we ditch it?The Watch is slow - opening a view is slow. So a deep navigation doesn’t work.

9

Who would read this on such a small screen?

There are many things that just don’t work on a very small screen The user always has his phone with him

Page 10: See the time on your wrist - Apple Watch presentation

Another approach

10

Page 11: See the time on your wrist - Apple Watch presentation

Design for WatchKeep things simple and fast Don’t port your entire app to the watch - Structure can be different Focus on one important aspect of your app - What does the user want to do in a very short amount of time?

11

Page 12: See the time on your wrist - Apple Watch presentation

Architecture

12https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/

Page 13: See the time on your wrist - Apple Watch presentation

User Actions

13https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/

App

WatchKit Extension

Page 14: See the time on your wrist - Apple Watch presentation

Initial Data

14

App

WatchKit Extension

Data

We can’t execute code in the Watch. We can do an HTTP Request from the Extension, but… - Apple says no - Will stop complete when

Watch app is closed Right place is our app - And in our case the app likely

already has the data so no need for request

App

WatchKit Extension

Page 15: See the time on your wrist - Apple Watch presentation

Sharing dataEnter technical note TN2408 - File coordinators and shared containers is a no-no Instead use - CFPreferences - `writeToFile:atomically:` (Atomic write) - SQLite - Core Data

15

Page 16: See the time on your wrist - Apple Watch presentation

Oh and let's not forgetIn no way is your data guaranteed to be stored with SQLite and Core Data.

16

Page 17: See the time on your wrist - Apple Watch presentation

Think about writing data thoughSQLite and Core Data double entries

- Atomic writes, last writer wins

Storing in the cloud works very well - Be it CloudKit or a random web address

17

Page 18: See the time on your wrist - Apple Watch presentation

What aboutopenParentApplication:reply: application:handleWatchKitExtensionRequest:reply:

It is - Pretty slow - Gets even slower with more data - But potentially very useful, it wakes up the containing app

18

Page 19: See the time on your wrist - Apple Watch presentation

MMWormhole

As simple as[self.wormhole passMessageObject: @{@"buttonNumber" : @(1)} identifier:@"button"]; [self.wormhole listenForMessageWithIdentifier:@"button" listener:^(id messageObject) { self.numberLabel.text = [messageObject[@“buttonNumber"] stringValue]; } ];

Internally uses Darwin Notifications and atomic writes

19

[self.wormhole passMessageObject: @{@"buttonNumber" : @(1)} identifier:@"button"];[self.wormhole listenForMessageWithIdentifier:@"button" listener:^(id messageObject) { self.numberLabel.text = [messageObject[@"buttonNumber"] stringValue]; } ];

Page 20: See the time on your wrist - Apple Watch presentation

Too much complexity?In the end, we made due with a shared NSUserDefaults

- Have the iPhone figure out when and how to fetch data - Silent push notifications - Preparing and staging data

Apple Watch screen is tiny - So how much data do you really need? - Focus on “the interaction”

20

Page 21: See the time on your wrist - Apple Watch presentation

ConclusionThe Apple Watch is still early stages - Native coming soon - Hopefully more stability and better API’s coming

along with it

Complement your iPhone app with a Watch App really designed for the watch - Simplicity & Speed - Pay attention to integration with the iPhone

21

Page 22: See the time on your wrist - Apple Watch presentation

Questions?

22

Find us on Twitter

@lwesterhoff

@leenarts