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.1k
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
Enhancing Applications with Accessibility API
kishikawakatsumi
3
890
Mastering SwiftSyntax
kishikawakatsumi
3
3.9k
My SwiftData Review
kishikawakatsumi
7
1.2k
Swift Expression Macros: a practical introduction
kishikawakatsumi
3
1.6k
Xcode Cloudの評価
kishikawakatsumi
2
1.1k
Regular expressions basics/正規表現の基本
kishikawakatsumi
6
630
家のいろいろな数値を計測する
kishikawakatsumi
4
1.9k
GitHub Actionsでテストの結果をわかりやすく表示する
kishikawakatsumi
1
670
GitHub Actionsでテストの結果をわかりやすく表示する
kishikawakatsumi
1
1.5k
Other Decks in Technology
See All in Technology
エンジニアブランディングチームの KPI / KPI's of engineer branding team
chaspy
1
140
あらゆる商品を扱う商品データベースを再設計した話 / product db re-architecture
rince
8
3.6k
オブジェクト指向宗教史
tanakahisateru
13
12k
Oracle Database で機械学習を始めよう! Oracle Machine Learning
oracle4engineer
PRO
1
140
Elementaryを用いたデータ品質の可視化とデータ基盤の運用改善
10xinc
6
1.4k
HoneycombとOpenTelemetryでオブザーバビリティに入門してみる
sumiren
2
150
初心者が行く!サーバレスWebアプリ開発の道
nagaharutogawa
0
440
ビジネスとコード品質の接合点 そしてコード品質がそこに及ぼす影響 / The Intersections of Business and Engineering, and The Impact of Code Quality There
mtx2s
10
1k
SREsのためのSRE定着ガイド
netmarkjp
10
1.6k
BDD(Cucumber)コミュニティが無料提供しているコンテンツの紹介と現在起きている危機
nihonbuson
4
730
Challenges - Open Farming Hackdays 2024
loleg
0
540
統計的学習理論読み Chapter 2
kmatsui
1
200
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
19
1.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
The Mythical Team-Month
searls
214
42k
How to train your dragon (web standard)
notwaldorf
71
5.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
319
20k
The World Runs on Bad Software
bkeepers
PRO
60
6.6k
For a Future-Friendly Web
brad_frost
170
8.9k
How GitHub (no longer) Works
holman
301
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.3k
Facilitating Awesome Meetings
lara
39
5.5k
A Modern Web Designer's Workflow
chriscoyier
689
190k
GitHub's CSS Performance
jonrohan
1023
450k
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