Upload
alex-rudyak
View
328
Download
0
Embed Size (px)
Citation preview
Apple Watch (part 2)road to watch OS 2
Alex Rudyak (@alesanro). *instinctools, Hrodna, 2015
Contents
● Main differences
● New features
Main differences
- changes in app life-cycle
- updating notifications
- data management
- device communications
Changes in life-cycle
Extension Delegate
Updating notifications
Global and local notifications - handling in
Extension Delegate
Handling depends on if you work with Watch
App or not
Data Management
- data placement (“Documents” and “Cache”)
- manual backups
- no integrity with iCloud
- media files
Device communication
Watch Connectivity Framework
Basic definition - session (WCSession)
Device communication
- update application context (glances)
- user information (complications)
- file transfering
- interactive messaging
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
Frameworks
Network: Now device can perform own
network requests without help of the phone
device.
Graphics: CoreGraphics availability
UI elements - pickers
Just like any other picker presents list of
items +
- navigation with Digital Crown
- coordinate with animations
UI elements - movie and audio
WKMovieObject
- playing audio-only, video-only, video +
audio
- record audio
UI elements - alerts
Present user-related information
presentAlertControllerWithTitle:message:preferredStyle:actions:
Keychain
● SecItemAdd,● SecItemUpdate, ● SecItemDelete, ● SecItemCopyMatching
use kSecAttrAccessibleWhenUnlocked attribute
External URLs
- telephone numbers (tel:)
- texts (sms:)
[[WKExtension sharedExtension] openSystemURL:]
Complications
Complications
Complications
ClockKit framework
Object which implements CLKComplicationDataSource
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
Usefull links
1. https://developer.apple.com/library/prerelease/watchos/navigation/
2. https://developer.apple.
com/library/prerelease/watchos/documentation/General/Conceptual/Apple
Watch2TransitionGuide/index.html#//apple_ref/doc/uid/TP40015234
3. https://www.slideshare.net/secret/Kpxw2CAIzaVxRD
Thanks for attention!