how to win on the apple watch

52
How to Win on the Apple Watch @NatashaTheRobot

Upload: natasha-murashev

Post on 17-Jan-2017

697 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: How to Win on the Apple Watch

How to Win on the Apple Watch

@NatashaTheRobot

Page 2: How to Win on the Apple Watch
Page 3: How to Win on the Apple Watch
Page 4: How to Win on the Apple Watch
Page 5: How to Win on the Apple Watch
Page 6: How to Win on the Apple Watch
Page 7: How to Win on the Apple Watch
Page 8: How to Win on the Apple Watch
Page 9: How to Win on the Apple Watch
Page 10: How to Win on the Apple Watch
Page 11: How to Win on the Apple Watch
Page 12: How to Win on the Apple Watch
Page 13: How to Win on the Apple Watch
Page 14: How to Win on the Apple Watch
Page 15: How to Win on the Apple Watch
Page 16: How to Win on the Apple Watch
Page 17: How to Win on the Apple Watch
Page 18: How to Win on the Apple Watch
Page 19: How to Win on the Apple Watch

How to Win on the ⌚

• Notifications

• Complications

• Watch Connectivity

Page 20: How to Win on the Apple Watch

Notifications

Page 21: How to Win on the Apple Watch
Page 22: How to Win on the Apple Watch
Page 23: How to Win on the Apple Watch
Page 24: How to Win on the Apple Watch
Page 25: How to Win on the Apple Watch

// NotificationController override func didReceiveRemoteNotification( remoteNotification: [NSObject : AnyObject], withCompletion completionHandler: ((WKUserNotificationInterfaceType) -> Void)) { // This method is called when // a remote notification needs to be presented. // Implement it if you use a dynamic // notification interface. // Populate your dynamic notification interface // as quickly as possible. // // After populating your dynamic notification // interface call the completion block. completionHandler(.Custom) //completionHandler(.Default) }

Page 26: How to Win on the Apple Watch
Page 27: How to Win on the Apple Watch

// InterfaceController override func handleActionWithIdentifier( identifier: String?, forRemoteNotification remoteNotification: [NSObject : AnyObject]) { if let identifier = identifier where identifier == "showMinionsAction" { // configure display } }

Page 28: How to Win on the Apple Watch

Complicationsit’s complicated 🤔

Page 29: How to Win on the Apple Watch
Page 30: How to Win on the Apple Watch
Page 31: How to Win on the Apple Watch
Page 32: How to Win on the Apple Watch
Page 33: How to Win on the Apple Watch
Page 34: How to Win on the Apple Watch

Creating Complications with ClockKit

WWDC15 Session 209

Page 35: How to Win on the Apple Watch

https://github.com/tryswift/trySwiftApp

Page 36: How to Win on the Apple Watch
Page 37: How to Win on the Apple Watch

DO Repeat Yourself

Page 38: How to Win on the Apple Watch

// iOS app struct Session { let startTime: NSDate let endTime: NSDate let description: String let location: String let speaker: Speaker? }

// Watch App struct Session { let startTime: NSDate let endTime: NSDate let location: String let speaker: Speaker? let index: Int }

Page 39: How to Win on the Apple Watch
Page 40: How to Win on the Apple Watch

DO Repeat Yourself

but not too much…

Page 41: How to Win on the Apple Watch

Watch Connectivity

Page 42: How to Win on the Apple Watch

Background Data Transfer

Page 43: How to Win on the Apple Watch

• application context

Page 44: How to Win on the Apple Watch

• application context

• user info transfer

Page 45: How to Win on the Apple Watch

• application context

• user info transfer

• file transfer

Page 46: How to Win on the Apple Watch

Interactive Messaging

Page 47: How to Win on the Apple Watch

• Immediate Information Transfer

• Requires reachable state

Page 48: How to Win on the Apple Watch

WCSession

Page 49: How to Win on the Apple Watch

// check needed for iOS App Only if WCSession.isSupported() { // activate session for both! let session = WCSession.defaultSession() session.delegate = self session.activateSession() }

Page 50: How to Win on the Apple Watch

How to Win on the ⌚

• Notifications

• Complications

• Watch Connectivity

Page 51: How to Win on the Apple Watch

Which future will you build for?

Page 52: How to Win on the Apple Watch