Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Practical WatchKit Development (UIKonf 2015)
Search
Claus Höfele
May 18, 2015
Programming
0
250
Practical WatchKit Development (UIKonf 2015)
Presentation at UIKonf 2015 in Berlin
http://www.uikonf.com
Claus Höfele
May 18, 2015
Tweet
Share
More Decks by Claus Höfele
See All by Claus Höfele
Server-Side Swift (iOSDevUK 7)
choefele
0
200
Running Swift Code on AWS Lambda (CocoaHeads 01/2017)
choefele
0
370
Swift server applications with Docker (Swift.Berlin #21)
choefele
0
310
Practical WatchKit Development (CocoaHeads 04/2015)
choefele
0
93
Developing Apps for the Watch
choefele
0
140
Other Decks in Programming
See All in Programming
Refactor your code - refactor yourself
xosofox
1
260
MCP with Cloudflare Workers
yusukebe
2
220
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
useSyncExternalStoreを使いまくる
ssssota
6
1k
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
120
CSC305 Lecture 26
javiergs
PRO
0
140
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
事業成長を爆速で進めてきたプロダクトエンジニアたちの成功談・失敗談
nealle
3
1.4k
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
45
7k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
How GitHub (no longer) Works
holman
311
140k
How to Ace a Technical Interview
jacobian
276
23k
Scaling GitHub
holman
458
140k
Optimizing for Happiness
mojombo
376
70k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Bash Introduction
62gerente
608
210k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Faster Mobile Websites
deanohume
305
30k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Transcript
Practical WatchKit Development @claushoefele
Kleinanzeigen TransitHopper
WatchKit App WatchKit Extension iOS App WatchKit App vs Extension
None
Interactive Notifications
class TripDetailInterfaceController: WKInterfaceController { @IBOutlet private weak var map: WKInterfaceMap!
override func awakeWithContext(context: AnyObject?) { super.awakeWithContext(context) ... } override func willActivate() { super.willActivate() ... } }
map.addAnnotation(coordinate, withPinColor: .Red) let coordinateRegion = MKCoordinateRegionMakeWithDistance[...] map.setRegion(coordinateRegion)
Tables
Paging
Hides when loading Off On
None
WatchKit App WatchKit Extension Requesting Data
WatchKit App WatchKit Extension iOS App openParentApplication()
private func callParentApp() { let userInfo = ["input": "data"] WKInterfaceController.openParentApplication(userInfo)
{ replyInfo, error in println("reply \(replyInfo)") } } func application(_:handleWatchKitExtensionRequest:reply:) Calling the Parent App
Handoff
User Location Permissions WatchKit App WatchKit Extension iOS App When
In Use Always
WatchKit Extension iOS App Sharing Data
None
let defaults = NSUserDefaults(suiteName: "group.com.claushoefele.T")! func updateObjectForKey<T: NSCoding>(key: String, item:
T) { let data = NSKeyedArchiver.archivedDataWithRootObject(item) defaults.setObject(data, forKey: key) }
WatchKit Extension iOS App Signalling
func sendDarwinNotification(identifier: String) { let darwinNotificationCenter = CFNotificationCenterGetDarwinNotifyCenter() CFNotificationCenterPostNotification(darwinNotificationCenter, identifier,
nil, nil, 1); } CFNotificationCenterAddObserver
Data Sync
“A WatchKit app complements your iOS app; it does not
replace it.” –Apple Watch HIG
“Anything that could show the user a progress spinner (however
briefly) is a failure on my part.” –David Smith
“[…] many of us — developers included — are still figuring out how
this device fits into daily life […]” –M.G. Siegler
Practical WatchKit Development @claushoefele http://slack.fiveminutewatchkit.com