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
240
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
CSC307 Lecture 05
javiergs
PRO
0
210
Trial
cairolibrary720
1
130
HMSコンペ 11th Solution (team : kansai-kaggler)
t88
1
680
Microservices rules (July 2024) : what good looks like
cer
PRO
0
1.6k
CSC307 Lecture 14
javiergs
PRO
0
220
初心者がおさえておきたいAWS CDKのベストプラクティス 2024
konokenj
15
7.3k
企業向け生成AIアプリの 開発から得られた知見
takaakikakei
0
310
TiDB Serverless ~理想のServerless DBを考える~
soso_15315
1
160
入社1ヶ月でここまでやった!Findy Toolsインフラ支援の最適化
rvirus0817
6
1.4k
CSC307 Lecture 08
javiergs
PRO
0
330
生成AIをkintoneに連携してみた
hideg
0
230
Jetpack for KMP
fornewid
1
290
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
127
8.7k
Making Projects Easy
brettharned
111
5.7k
GraphQLとの向き合い方2022年版
quramy
36
13k
We Have a Design System, Now What?
morganepeng
46
7k
Principles of Awesome APIs and How to Build Them.
keavy
124
16k
Designing Experiences People Love
moore
136
23k
Why Our Code Smells
bkeepers
PRO
332
56k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
121
18k
Building Applications with DynamoDB
mza
89
5.8k
How to Ace a Technical Interview
jacobian
274
23k
Fantastic passwords and where to find them - at NoRuKo
philnash
42
2.7k
Testing 201, or: Great Expectations
jmmastey
33
6.9k
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