Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Time Matters: A WatchKit Story

Time Matters: A WatchKit Story

This is a talk I gave at @SwiftConf 2015. It shows what decisions we made at HRS during the development of our first WATCH extension and why.

Michael Ochs

June 24, 2015
Tweet

More Decks by Michael Ochs

Other Decks in Programming

Transcript

  1. SwiftConf.com HRS - Hotel Reservation Service WATCH app in the

    store on launch day Developed by two engineers Completely written in Swift
  2. SwiftConf.com A watch is about time It has a very

    small display It is used at a glance
  3. SwiftConf.com A watch is about time Information needs to be

    relevant now Inform about the current or upcoming event Progress further in the timeline on user request Information at a glance
  4. SwiftConf.com It has a very small display Show the most

    important information As little user interaction as possible Handoff is your friend
  5. SwiftConf.com It is used at a glance A couple of

    seconds It is about consuming information
  6. SwiftConf.com What is the most important feature of the iOS

    app? Booking a hotel What is the most time relevant feature? When is my next reservation? What is the most important information while on the go? Where is my next reservation?
  7. SwiftConf.com Upcoming bookings Hotel detail hotel name hotel address city

    hotel on map number of nights hotel phone number arrival date earliest checkin time departure date reception opening time current booking? reception closing time
  8. SwiftConf.com Upcoming bookings Hotel detail hotel name hotel address city

    hotel on map number of nights hotel phone number arrival date earliest checkin time reception opening time reception closing time departure date current booking?
  9. SwiftConf.com UI & data communicates asynchronously Extension has no background

    execution Extension and iOS app have different sandboxes
  10. SwiftConf.com Communication between Extension and iOS app WatchConnectivity func updateApplicationContext(_:

    [String : AnyObject]) -> Void func sendMessage(_: [String : AnyObject],
 replyHandler: (([String : AnyObject]) -> Void)?,
 errorHandler: ((NSError) -> Void)?) -> Void optional func session(_ session: WCSession,
 didReceiveApplicationContext: [String : AnyObject]) -> Void optional func session(_: WCSession,
 didReceiveMessage: [String : AnyObject],
 replyHandler: ([String : AnyObject]) -> Void) -> Void watchOS 2
  11. SwiftConf.com Time relevant information Information on the go Keep information

    very condensed As little user interaction as possible Ensure UI is understandable at a glance Keep communication at a minimum