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
210
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
100
Developing Apps for the Watch
choefele
0
150
Other Decks in Programming
See All in Programming
技術同人誌をMCP Serverにしてみた
74th
1
510
新メンバーも今日から大活躍!SREが支えるスケールし続ける組織のオンボーディング
honmarkhunt
1
330
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
180
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.5k
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
460
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
Result型で“失敗”を型にするPHPコードの書き方
kajitack
4
560
エラーって何種類あるの?
kajitack
5
330
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
150
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
1.7k
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
600
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
2
240
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
331
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Typedesign – Prime Four
hannesfritz
42
2.7k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
How to Ace a Technical Interview
jacobian
277
23k
Building an army of robots
kneath
306
45k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
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