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
230
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
90
Developing Apps for the Watch
choefele
0
140
Other Decks in Programming
See All in Programming
Git Lint
bkuhlmann
4
740
Front-end application development, Symfony-style(s)
dunglas
2
1.9k
どうしてこうなった命名集 ~🔥編~ / OOC 2024 LT
pictiny
5
3.9k
Javaエンジニアのための Nodejs/Nuxt3入門
hidekatsu_izuno
0
270
元気予報
suu_mire0726
0
850
せっかくモデル図描くのなら、嬉しいことが多い方がいいよね!
kuboaki
1
3.1k
オブジェクト指向は必要なのか / Is object-oriented needed?
kishida
31
21k
エンターテイメント業界で利用されるAWS
demuyan
0
200
デザインシステムで Tailwind CSSとCSS in JSに分散投資をしたら良かった話
fsubal
18
4.8k
StreamlitとTerraformでデータカタログを作った話
gussan0223
0
290
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
100
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.2k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
265
19k
Code Reviewing Like a Champion
maltzj
513
39k
Raft: Consensus for Rubyists
vanstee
131
6.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
645
57k
Visualization
eitanlees
135
14k
Designing for Performance
lara
601
67k
Gamification - CAS2011
davidbonilla
76
4.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
355
22k
How GitHub (no longer) Works
holman
304
140k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
2k
Principles of Awesome APIs and How to Build Them.
keavy
119
16k
The Invisible Side of Design
smashingmag
293
49k
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