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.3k
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
iOSでSVG画像を扱う
kishikawakatsumi
0
170
Build your own WebP codec in Swift
kishikawakatsumi
2
1k
iOSDC 2024 SMBファイル共有をSwiftで実装する
kishikawakatsumi
1
270
Enhancing Applications with Accessibility API
kishikawakatsumi
3
4.7k
Mastering SwiftSyntax
kishikawakatsumi
4
6.9k
My SwiftData Review
kishikawakatsumi
7
1.5k
Swift Expression Macros: a practical introduction
kishikawakatsumi
3
2k
Xcode Cloudの評価
kishikawakatsumi
2
1.4k
Regular expressions basics/正規表現の基本
kishikawakatsumi
7
810
Other Decks in Technology
See All in Technology
ブラウザのAPIで Nintendo Switch用の特殊なゲーム用コントローラーを体験型コンテンツに / IoTLT @ストラタシス・ジャパン
you
PRO
0
140
Azure Well-Architected Framework入門
tomokusaba
1
130
NLPコロキウム20251022_超効率化への挑戦: LLM 1bit量子化のロードマップ
yumaichikawa
3
470
OCIjp_Oracle AI World_Recap
shinpy
1
180
混合雲環境整合異質工作流程工具運行關鍵業務 Job 的經驗分享
yaosiang
0
190
ViteとTypeScriptのProject Referencesで 大規模モノレポのUIカタログのリリースサイクルを高速化する
shuta13
3
200
20251027_マルチエージェントとは
almondo_event
1
430
Linux カーネルが支えるコンテナの仕組み / LF Japan Community Days 2025 Osaka
tenforward
1
130
AI機能プロジェクト炎上の 3つのしくじりと学び
nakawai
0
110
AI時代におけるデータの重要性 ~データマネジメントの第一歩~
ryoichi_ota
0
710
Kubernetes self-healing of your workload
hwchiu
0
540
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
360
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Docker and Python
trallard
46
3.6k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Facilitating Awesome Meetings
lara
57
6.6k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
640
Building Adaptive Systems
keathley
44
2.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
The World Runs on Bad Software
bkeepers
PRO
72
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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