mobiletech conference 2015: apple watch apps

45
Mit WatchKit Apps für die Apple Watch entwicklen @claushoefele

Upload: claus-hoefele

Post on 12-Apr-2017

306 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: MobileTech Conference 2015: Apple Watch Apps

Mit WatchKit Apps für die Apple Watch entwicklen

@claushoefele

Page 2: MobileTech Conference 2015: Apple Watch Apps

Kleinanzeigen TransitHopper

Page 3: MobileTech Conference 2015: Apple Watch Apps

Next meeting

Page 4: MobileTech Conference 2015: Apple Watch Apps

Follow Back

Page 5: MobileTech Conference 2015: Apple Watch Apps

ToDo with Siri/Things

Page 6: MobileTech Conference 2015: Apple Watch Apps

“[…] the watch is a useful luxury […]”

–Benedict Evans

Page 7: MobileTech Conference 2015: Apple Watch Apps

Agenda

• Interaction Models • Transitioning to watchOS 2 • Implementation Overview

Page 8: MobileTech Conference 2015: Apple Watch Apps

Usability

UtilityUtility/Usability Model

Page 9: MobileTech Conference 2015: Apple Watch Apps

Interactive Notifications

Notifications

Apps

Glances Complications

Usability

Utility

Siri Background

Apps

Interactive Glances

Interaction Models

Page 10: MobileTech Conference 2015: Apple Watch Apps

Priorities

Interactive Notifications Complications Glances

1. 2. 3.

Apps are landing pages for extensions

Page 11: MobileTech Conference 2015: Apple Watch Apps
Page 12: MobileTech Conference 2015: Apple Watch Apps

OS 2WatchKit Extension

WatchKitExtension

iOS App

OS 1

Watch App

Page 13: MobileTech Conference 2015: Apple Watch Apps

watchOS 1

Page 14: MobileTech Conference 2015: Apple Watch Apps

Hides When Loading

Initially display Storyboard values

Page 15: MobileTech Conference 2015: Apple Watch Apps

watchOS 1(Hides When Loading disabled)

Page 16: MobileTech Conference 2015: Apple Watch Apps

watchOS 2

Page 17: MobileTech Conference 2015: Apple Watch Apps

Storyboards

Page 18: MobileTech Conference 2015: Apple Watch Apps

class TripDetailInterfaceController: WKInterfaceController { @IBOutlet private weak var map: WKInterfaceMap! override func awakeWithContext(context: AnyObject?) { super.awakeWithContext(context)

... } override func willActivate() { super.willActivate()

... } }

Page 19: MobileTech Conference 2015: Apple Watch Apps

map.addAnnotation(coordinate, withPinColor: .Red) let coordinateRegion =

MKCoordinateRegionMakeWithDistance[...] map.setRegion(coordinateRegion)

Page 20: MobileTech Conference 2015: Apple Watch Apps

watchOS 2

• Extensions running on the watch • Animations • More access to hardware • Complications (ClockKit) • Watch can connect to WiFi directly • Watch Connectivity framework

Page 21: MobileTech Conference 2015: Apple Watch Apps

watchOS 2

Upgrade

Page 22: MobileTech Conference 2015: Apple Watch Apps

watchOS 1

watchOS 2

Targets

Page 23: MobileTech Conference 2015: Apple Watch Apps

Earlier 2%iOS 7

13%

iOS 8 86%

iOS Distribution

Page 24: MobileTech Conference 2015: Apple Watch Apps

OS 1Parent App

WatchKitExtension

iOS App

Watch App

openParentApplication()

Darwin Notifications

App Group Container

Page 25: MobileTech Conference 2015: Apple Watch Apps

Parent App

WatchKitExtension

iOS AppWatch App

OS 2

Watch ConnectivityFramework

Page 26: MobileTech Conference 2015: Apple Watch Apps

Watch Connectivity

• Background mode • Application context • User Info Transfer • File Transfer

• Interactive messaging • Dictionary • Data

Page 27: MobileTech Conference 2015: Apple Watch Apps

OS 1Networking

WatchKitExtension

iOS App

Watch App

Page 28: MobileTech Conference 2015: Apple Watch Apps

Networking

Watch App

OS 2

Page 29: MobileTech Conference 2015: Apple Watch Apps

Networking

• Full support HTTP/S (2) & ATS • Apps will only run for a very short time

• Keep it quick • Background uploads/downloads • Watch Connectivity

• No NSURLConnection

Page 30: MobileTech Conference 2015: Apple Watch Apps

Hidden Complexities

CC BY 2.0 Natalie Lucier https://flic.kr/p/6weBij

Page 31: MobileTech Conference 2015: Apple Watch Apps

Notifications

Page 32: MobileTech Conference 2015: Apple Watch Apps

Short look Long look Static

Dynamic

Default

Customized

Notification Appearances

Page 33: MobileTech Conference 2015: Apple Watch Apps

Category

Category

Page 34: MobileTech Conference 2015: Apple Watch Apps

Interactive Notifications

Page 35: MobileTech Conference 2015: Apple Watch Apps

Foreground/background

Implementing Actions

Identifier

Page 36: MobileTech Conference 2015: Apple Watch Apps

Foreground Actions

Page 37: MobileTech Conference 2015: Apple Watch Apps

Complications OS 2

Page 38: MobileTech Conference 2015: Apple Watch Apps

Complication Families

Modular Large

Circular Small Utilitarian Small

Utilitarian Large

Modular Small

Page 39: MobileTech Conference 2015: Apple Watch Apps

Time Travel

Lunch12:00PM

Meeting1:00PM

Gym2:00PM

12:45PM

TimelineEntry

TimelineEntry

13:45PM

TimelineEntry

Page 40: MobileTech Conference 2015: Apple Watch Apps

• Small space • Data delivery • PushKit • Timed update

• Budgeted execution time

Implementing Complications

Page 41: MobileTech Conference 2015: Apple Watch Apps

Glances

Page 42: MobileTech Conference 2015: Apple Watch Apps

Glance Templates

Page 43: MobileTech Conference 2015: Apple Watch Apps

Glance Templates

Page 44: MobileTech Conference 2015: Apple Watch Apps

• Non-interactive • UI based on templates • Use Handoff to pass data to app • Consider using performExpiringActivityWithReason:usingBlock:

Implementing Glances

Page 45: MobileTech Conference 2015: Apple Watch Apps

@claushoefele