Apple watch (part 2)
-
Upload
alex-rudyak -
Category
Mobile
-
view
324 -
download
0
Transcript of Apple watch (part 2)
![Page 1: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/1.jpg)
Apple Watch (part 2)road to watch OS 2
Alex Rudyak (@alesanro). *instinctools, Hrodna, 2015
![Page 2: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/2.jpg)
Contents
● Main differences
● New features
![Page 3: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/3.jpg)
Main differences
- changes in app life-cycle
- updating notifications
- data management
- device communications
![Page 4: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/4.jpg)
Changes in life-cycle
Extension Delegate
![Page 5: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/5.jpg)
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)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/6.jpg)
Data Management
- data placement (“Documents” and “Cache”)
- manual backups
- no integrity with iCloud
- media files
![Page 7: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/7.jpg)
Device communication
Watch Connectivity Framework
Basic definition - session (WCSession)
![Page 8: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/8.jpg)
Device communication
- update application context (glances)
- user information (complications)
- file transfering
- interactive messaging
![Page 9: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/9.jpg)
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)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/10.jpg)
Frameworks
Network: Now device can perform own
network requests without help of the phone
device.
Graphics: CoreGraphics availability
![Page 11: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/11.jpg)
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)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/12.jpg)
UI elements - movie and audio
WKMovieObject
- playing audio-only, video-only, video +
audio
- record audio
![Page 13: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/13.jpg)
UI elements - alerts
Present user-related information
presentAlertControllerWithTitle:message:preferredStyle:actions:
![Page 14: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/14.jpg)
Keychain
● SecItemAdd,● SecItemUpdate, ● SecItemDelete, ● SecItemCopyMatching
use kSecAttrAccessibleWhenUnlocked attribute
![Page 15: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/15.jpg)
External URLs
- telephone numbers (tel:)
- texts (sms:)
[[WKExtension sharedExtension] openSystemURL:]
![Page 16: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/16.jpg)
Complications
![Page 17: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/17.jpg)
Complications
![Page 18: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/18.jpg)
Complications
ClockKit framework
Object which implements CLKComplicationDataSource
![Page 19: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/19.jpg)
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 20: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/20.jpg)
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
![Page 21: Apple watch (part 2)](https://reader031.fdocuments.in/reader031/viewer/2022022413/58a39d3d1a28abb1348b6347/html5/thumbnails/21.jpg)
Thanks for attention!