$30 off During Our Annual Pro Sale. View Details »
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
270
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
220
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
AIを駆使して新しい技術を効率的に理解する方法
nogu66
1
670
Promise.tryで実現する新しいエラーハンドリング New error handling with Promise try
bicstone
3
1.7k
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
32
15k
スタートアップを支える技術戦略と組織づくり
pospome
8
13k
CSC509 Lecture 13
javiergs
PRO
0
260
Atomics APIを知る / Understanding Atomics API
ssssota
1
220
しっかり学ぶ java.lang.*
nagise
1
460
React Native New Architecture 移行実践報告
taminif
1
110
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
820
dnx で実行できるコマンド、作ってみました
tomohisa
0
110
CloudflareのSandbox SDKを試してみた
syumai
0
180
[SF Ruby Conf 2025] Rails X
palkan
0
370
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Designing for humans not robots
tammielis
254
26k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Why Our Code Smells
bkeepers
PRO
340
57k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
How STYLIGHT went responsive
nonsquared
100
5.9k
Balancing Empowerment & Direction
lara
5
770
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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