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
260
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
320
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
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
790
functionalなアプローチで動的要素を排除する
ryopeko
1
950
チームの立て直し施策をGoogleの 『効果的なチーム』と見比べてみた
maroon8021
0
280
Flatt Security XSS Challenge 解答・解説
flatt_security
0
1.1k
Rubyでつくるパケットキャプチャツール
ydah
0
540
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
260
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
270
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
3
310
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
1
540
Оптимизируем производительность блока Казначейство
lamodatech
0
990
振り返れば奴(Cline)がいる
keiyagi
0
130
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
180
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Why Our Code Smells
bkeepers
PRO
335
57k
RailsConf 2023
tenderlove
29
980
The World Runs on Bad Software
bkeepers
PRO
67
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
We Have a Design System, Now What?
morganepeng
51
7.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
19k
How to Ace a Technical Interview
jacobian
276
23k
Documentation Writing (for coders)
carmenintech
67
4.6k
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