27
Minority Report with an Apple Watch @roderic 1

Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

Embed Size (px)

Citation preview

Page 1: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

Minority Report with an Apple Watch

@roderic 1

Page 2: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

or how close can we get?

@roderic 2

Page 3: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

Agenda• The Movie

• The Demo

• The Watch

• The Motion

• The Network

• The Next Steps

@roderic 3

Page 4: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Movie

• Precognition

@roderic 4

Page 5: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Movie

• Precognition

• Robots building robot cars around 2 cops fighting

@roderic 5

Page 6: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Movie

• Precognition

• Cool autonomous cars

• Non-lethal weapons

@roderic 6

Page 7: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Movie

• Precognition

• Cool autonomous cars

• Non-lethal weapons

• The multitouch, multidiminsional UI

@roderic 7

Page 8: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

Agenda• The Movie ✔

• The Demo

• The Watch

• The Motion

• The Network

• The Next Steps

@roderic 8

Page 9: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

@roderic 9

Page 10: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Watch ⌚• WatchOS was a good start

@roderic 10

Page 11: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Watch ⌚• WatchOS was a good start

• WatchOS 2 opens up a few new things

@roderic 11

Page 12: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Watch ⌚• WatchOS was a good start

• WatchOS 2 opens up a few new things

• WatchOS 2 developing for the watch should be very familiar

@roderic 12

Page 13: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

@roderic 13

Page 14: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Watch ⌚• Access to the Accelerometer

• WatchConnectivity

@roderic 14

Page 15: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

Agenda• The Movie ✔

• The Demo ✔

• The Watch ✔

• The Motion

• The Network

• The Next Steps

@roderic 15

Page 16: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Motion (CoreMotion)

@roderic 16

Page 17: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Motion (CoreMotion)import CoreMotionlet manager = CMMotionManager()manager.accelerometerUpdateInterval = 0.5...if (manager.accelerometerAvailable) {

manager.startAccelerometerUpdatesToQueue(motionQueue) { (data:CMAccelerometerData?, error:NSError?) -> Void in if let accel = data { // process the data on the watch }}

@roderic 17

Page 18: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

Agenda• The Movie ✔

• The Demo ✔

• The Watch ✔

• The Motion ✔

• The Network

• The Next Steps

@roderic 18

Page 19: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Network (WatchConnectivity)import WatchConnectivity

if(WCSession.isSupported()) { WCSession.defaultSession().delegate = self WCSession.defaultSession().activateSession()}

@roderic 19

Page 20: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Network (WatchConnectivity)public class WCSession : NSObject {... public var paired: Bool { get } public var reachable: Bool { get }

public func sendMessage(message: [String : AnyObject], replyHandler: (([String : AnyObject]) -> Void)?, errorHandler: ((NSError) -> Void)?)

public func updateApplicationContext(applicationContext: [String : AnyObject]) throws}

@roderic 20

Page 21: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Network (WatchConnectivity)public protocol WCSessionDelegate : NSObjectProtocol { // queueing mechanism optional public func session(session: WCSession, didReceiveMessage message: [String : AnyObject])

// just an update, drop everything else optional public func session(session: WCSession, didReceiveApplicationContext applicationContext: [String : AnyObject])}

@roderic 21

Page 22: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Network (WatchConnectivity)let message = ["x" : a.x, "y" : a.y, "z" : a.z, "time" : NSDate().timeIntervalSince1970, "rate": self.manager.accelerometerUpdateInterval]

session.sendMessage(message, replyHandler: { (content:[String : AnyObject]) -> Void in // Our counterpart can send an optional response}, errorHandler: { (error ) -> Void in // do something with the error})

@roderic 22

Page 23: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Network (WatchConnectivity)func session(session: WCSession, didReceiveMessage message: [String : AnyObject], replyHandler: ([String : AnyObject]) -> Void) {

if let xValue = message["x"] { self.xLabel.text = "x: ".stringByAppendingString(String(xValue)) // you know, or something more interesting than setting a label } ...}

@roderic 23

Page 24: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

Agenda• The Movie ✔

• The Demo ✔

• The Watch ✔

• The Motion ✔

• The Network ✔

• The Next Steps

@roderic 24

Page 25: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Next Steps• ! Testing shows .2s lag time to send and update the UI

• ⌚ Access to the gyroscope on the watch would be lovely

• ⌚ Handling the watch reachability when the screen turns off

• # DeckRocket (https://github.com/jpsim/DeckRocket)

@roderic 25

Page 26: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

The Next Steps• ⌚ " Entirely new gesture language with the watch and the

phone together

• ⌚ Putting together an actual UI with element selection, switching contexts, lists

• " 3D Touch with the new iPhone 6(+)s

@roderic 26

Page 27: Cotap Tech Talks: Roderic Campbell, Minority Report UX with an Apple Watch

• Code: https://github.com/rodericj/MinorityReportWithWatch

• Blog: http://thumbworks.io

• Contact:

[email protected]

• @roderic

• http://github.com/rodericj

"Sometimes, in order to see the light, you have to risk the dark." - Dr. Iris Hineman

"Goodbye Crow" - John Anderton

@roderic 27