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
190
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
91
Developing Apps for the Watch
choefele
0
140
Other Decks in Programming
See All in Programming
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
9
1k
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
1.1k
Piniaの現状と今後
waka292
5
1.5k
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
250
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
7
2.9k
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
4
1.7k
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
220
Macとオーディオ再生 2024/11/02
yusukeito
0
240
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
0
250
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.7k
僕がつくった48個のWebサービス達
yusukebe
18
17k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
1
43
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How STYLIGHT went responsive
nonsquared
95
5.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Designing Experiences People Love
moore
138
23k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Thoughts on Productivity
jonyablonski
67
4.3k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
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