21
Apple Watch (part 2) road to watch OS 2 Alex Rudyak (@alesanro). *instinctools, Hrodna, 2015

Apple watch (part 2)

Embed Size (px)

Citation preview

Page 1: Apple watch (part 2)

Apple Watch (part 2)road to watch OS 2

Alex Rudyak (@alesanro). *instinctools, Hrodna, 2015

Page 2: Apple watch (part 2)

Contents

● Main differences

● New features

Page 3: Apple watch (part 2)

Main differences

- changes in app life-cycle

- updating notifications

- data management

- device communications

Page 4: Apple watch (part 2)

Changes in life-cycle

Extension Delegate

Page 5: Apple watch (part 2)

Updating notifications

Global and local notifications - handling in

Extension Delegate

Handling depends on if you work with Watch

App or not

Page 6: Apple watch (part 2)

Data Management

- data placement (“Documents” and “Cache”)

- manual backups

- no integrity with iCloud

- media files

Page 7: Apple watch (part 2)

Device communication

Watch Connectivity Framework

Basic definition - session (WCSession)

Page 8: Apple watch (part 2)

Device communication

- update application context (glances)

- user information (complications)

- file transfering

- interactive messaging

Page 9: Apple watch (part 2)

New features

- availability of new frameworks (NSULRSession, CoreGraphic and so on)

- UI elements (pickers, movie and audio, alerts and action sheets)

- keychain availability- opening external url- complications

Page 10: Apple watch (part 2)

Frameworks

Network: Now device can perform own

network requests without help of the phone

device.

Graphics: CoreGraphics availability

Page 11: Apple watch (part 2)

UI elements - pickers

Just like any other picker presents list of

items +

- navigation with Digital Crown

- coordinate with animations

Page 12: Apple watch (part 2)

UI elements - movie and audio

WKMovieObject

- playing audio-only, video-only, video +

audio

- record audio

Page 13: Apple watch (part 2)

UI elements - alerts

Present user-related information

presentAlertControllerWithTitle:message:preferredStyle:actions:

Page 14: Apple watch (part 2)

Keychain

● SecItemAdd,● SecItemUpdate, ● SecItemDelete, ● SecItemCopyMatching

use kSecAttrAccessibleWhenUnlocked attribute

Page 15: Apple watch (part 2)

External URLs

- telephone numbers (tel:)

- texts (sms:)

[[WKExtension sharedExtension] openSystemURL:]

Page 16: Apple watch (part 2)

Complications

Page 17: Apple watch (part 2)

Complications

Page 18: Apple watch (part 2)

Complications

ClockKit framework

Object which implements CLKComplicationDataSource

Page 19: Apple watch (part 2)

Complications: why shouldn’t use it

● Can you fit your data into the available complication

templates

● Do you already use notifications to convey timely information

to the user

● How much data can you provide in advance

Page 21: Apple watch (part 2)

Thanks for attention!