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
Can send message to Watch App?
Search
Kishikawa Katsumi
May 27, 2015
Technology
1
1.2k
Can send message to Watch App?
Can send message to Watch App?
Inter-Process Notifications on iOS
Kishikawa Katsumi
May 27, 2015
Tweet
Share
More Decks by Kishikawa Katsumi
See All by Kishikawa Katsumi
iOSDC 2024 SMBファイル共有をSwiftで実装する
kishikawakatsumi
1
160
Enhancing Applications with Accessibility API
kishikawakatsumi
3
3.2k
Mastering SwiftSyntax
kishikawakatsumi
4
5.3k
My SwiftData Review
kishikawakatsumi
7
1.4k
Swift Expression Macros: a practical introduction
kishikawakatsumi
3
1.8k
Xcode Cloudの評価
kishikawakatsumi
2
1.2k
Regular expressions basics/正規表現の基本
kishikawakatsumi
7
720
家のいろいろな数値を計測する
kishikawakatsumi
4
2.2k
GitHub Actionsでテストの結果をわかりやすく表示する
kishikawakatsumi
1
1k
Other Decks in Technology
See All in Technology
Taming you application's environments
salaboy
0
190
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
230
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
520
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
Terraform Stacks入門 #HashiTalks
msato
0
350
強いチームと開発生産性
onk
PRO
34
11k
Lexical Analysis
shigashiyama
1
150
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Teambox: Starting and Learning
jrom
133
8.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
A designer walks into a library…
pauljervisheath
204
24k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Transcript
Apple Watch meetup
https://github.com/kishikawakatsumi/ kishikawa katsumi at Realm Inc http://kishikawakatsumi.hatenablog.com/
Anime Today
Can send message to Watch App?
Watch App => Container App
Watch App => Container App + (BOOL)openParentApplication:(NSDictionary *)userInfo reply:(void (^)(NSDictionary
*replyInfo, NSError *error))reply
Container App => Watch App
mutualmobile/MMWormhole
MMWormhole [self.wormhole passMessageObject:@{@"buttonNumber": @(1)} identifier:@"button"]; [self.wormhole listenForMessageWithIdentifier:@"button" listener:^(id messageObject) {
self.numberLabel.text = [messageObject[@"buttonNumber"] stringValue]; }];
Darwin Notify Center
Darwin Notify Center - Based on the libnotify. - Cannot
be passed "objects" - Cannot be passed "userInfo" - Always "deliver immediately"
Darwin Notify Center CFNotificationCenterRef const center = CFNotificationCenterGetDarwinNotifyCenter(); CFStringRef str
= (__bridge CFStringRef)@"com.kishikawakatsumi.notification.test"; CFNotificationCenterAddObserver(center, (__bridge const void *)(self), notificationCallback, str, NULL, CFNotificationSuspensionBehaviorDeliverImmediately); void notificationCallback(CFNotificationCenterRef center, void * observer, CFStringRef name, void const * object, CFDictionaryRef userInfo) { ... }
App => Today Extension App => Keyboard Extension
App => Other Apps
notify_keys.h /* * File System notifications * These advise clients
of various filesystem events. */ #define kNotifyVFSMount "com.apple.system.kernel.mount" #define kNotifyVFSUnmount "com.apple.system.kernel.unmount" #define kNotifyVFSUpdate "com.apple.system.kernel.mountupdate" #define kNotifyVFSLowDiskSpace "com.apple.system.lowdiskspace" #define kNotifyVFSLowDiskSpaceRootFS "com.apple.system.lowdiskspace.system" #define kNotifyVFSLowDiskSpaceOtherFS "com.apple.system.lowdiskspace.user"
com.apple.springboard.lockcomplete com.apple.springboard.ringerstate com.apple.springboard.deviceWillShutDown com.apple.springboard.lowPowerAlertPresented ...
Inter-Process Notifications on iOS http://realm.io/news/thomas-goyne-fast-inter-process-communication/ References