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
20170130 NotificationContent Extensionを使ってみた
Search
Kei Ito
January 30, 2017
Programming
0
1.3k
20170130 NotificationContent Extensionを使ってみた
関モバ #22の資料です
Kei Ito
January 30, 2017
Tweet
Share
More Decks by Kei Ito
See All by Kei Ito
20211015 Mac CatalystでmacOS用アプリを作る
itok
2
3.8k
20210219 Flutterに入門してみた
itok
1
3.6k
20201009 iOS 14 ウィジェットをつくってみた
itok
1
2.3k
20191206 Property Wrappers 入門
itok
0
1.5k
20190920 iOS 13 対応ではまった話
itok
1
2.2k
20190726 Background App Refresh Taskがやってきた
itok
0
2k
20190722 Firebase Remote Configでアドネットワークを管理する
itok
0
1.4k
20190419 iOSアプリで証明書の情報を参照する
itok
0
1.3k
20190412 Android TV向けアプリを作ってみる
itok
0
990
Other Decks in Programming
See All in Programming
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
Click-free releases & the making of a CLI app
oheyadam
2
110
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Jakarta EE meets AI
ivargrimstad
0
130
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Quine, Polyglot, 良いコード
qnighy
4
640
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
役立つログに取り組もう
irof
28
9.6k
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.5k
Jakarta EE meets AI
ivargrimstad
0
530
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Featured
See All Featured
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Gamification - CAS2011
davidbonilla
80
5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Making Projects Easy
brettharned
115
5.9k
Teambox: Starting and Learning
jrom
133
8.8k
GraphQLとの向き合い方2022年版
quramy
43
13k
Visualization
eitanlees
145
15k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
YesSQL, Process and Tooling at Scale
rocio
169
14k
GitHub's CSS Performance
jonrohan
1030
460k
Transcript
/PUJpDBUJPO$POUFOU &YUFOTJPOΛͬͯΈͨ ؔϞόΠϧΞϓϦݚڀձ !JUPL@UXJU
!JUPL@UXJU w ͍ͱ͏͚͍ʢJUPLʣ w ɹɹɹɹɹɹͷதͷਓ w ެࢲڞʹϓϩάϥϚJ04.BDʢͨ·ʹ"OESPJE8JOEPXTʣ w IUUQJUPLKQ IUUQTPSBLB[FDPKQ
/PUJpDBUJPO$POUFOU &YUFOTJPOͱ
දࣔͰ͖Δͷ w ී௨ͷ6*ίϯςϯπͳΒ͍͍ͩͨԿͰ
6*8FC7JFX
.,.BQ7JFX
ͬͯΈΑ͏ 9DPEFJ04 ϦϞʔτ௨
5BSHFUΛՃ
*OGPQMJTUͷฤू
6//PUJpDBUJPO&YUFOTJPO $BUFHPSZ w ඞਢ w ௨ૹ৴ଆͰ͜ΕΛࢦఆ w $BUFHPSZ͕Ұகͨ͠߹ͷΈ&YUFOTJPO͕ىಈ
6//PUJpDBUJPO&YUFOTJPO *OJUJBM$POUFOU4J[F3BUJP w ඞਢ w ௨7JFXͷΞεϖΫτൺॳظ w 7JFXͷαΠζ͋ͱ͔ΒมߋՄೳ w ԣج४
6//PUJpDBUJPO&YUFOTJPO %FGBVMU$POUFOU)JEEFO w Φϓγϣϯ w σϑΥϧτͷ௨༰Λදࣔ͢Δ͔Ͳ͏͔ͷϑϥά w 5JUMFɺ4VC5JUMFɺ#PEZͳͲ w σϑΥϧτɿGBMTF
6//PUJpDBUJPO&YUFOTJPO 0WFSSJEFT%FGBVMU5JUMF w Φϓγϣϯ w ௨7JFXͷ্෦λΠτϧΛ7JFX$POUSPMMFSUJUMFͰ ্ॻ͖͢Δ͔Ͳ͏͔ͷϑϥά w ௨༰ʹ߹ΘͤͨλΠτϧʹ͢Δ͜ͱՄೳ w
σϑΥϧτɿGBMTF
࣮ // දࣔॲཧͷ࣮ମ // self.title͜͜Ͱॻ͖͑ΒΕΔ←OverridesDefaultTitle func didReceive(_ notification: UNNotification) {
} // Actionॲཧͷ࣮ମ func didReceive(_ response: UNNotificationResponse, completionHandler completion: @escaping (UNNotificationContentExtensionResponseOption) -> Void) { } 6//PUJpDBUJPO$POUFOU&YUFOTJPO
௨ͷૹ৴ \ BQT\ BMFSU\ UJUMF5JUMF TVCUJUMF4VC5JUMF CPEZ#PEZ ^
DBUFHPSZNZ$BUFHPSZ ^ ^
ϝϞ w ௨7JFX্λονΠϕϯτ͕ൃੜ͠ͳ͍ w ϝσΟΞͷ࠶ੜίϯτϩʔϧ͚ͩදࣔ͢ΔͨΊͷ ϓϩύςΟ͕͋Δ w Ϣʔβ͔Βͷૢ࡞Λड͚͚͍ͨ߹ 6//PUJpDBUJPO"DUJPOΛ͏
ϝϞ w /PUJpDBUJPO4FSWJDF&YUFOTJPOͱҧͬͯແࢹͰ͖ ͳ͍ w $BUFHPSZΛΘ͚Δ͜ͱͰෳͷ&YUFOTJPOΛ͍ ͚Δ͜ͱ͕Ͱ͖Δ
ϝϞ w 4FSWJDF&YUFOTJPOͱͷಉډՄೳ NVUBCMFDPOUFOU ແ ༗ DBUFHPSZ ແ 4FSWJDF&YUFOTJPO
༗ $POUFOU&YUFOTJPO 4FSWJDF&YUFOTJPO ˣ $POUFOU&YUFOTJPO
"DUJPOαϯϓϧ \ BQT\ BMFSU\ UJUMFؔϞό TVCUJUMF CPEZ/PUJpDBUJPO$POUFOU&YUFOTJPOΛͬͯΈͨ!JUPL ^
DBUFHPSZ,BONPCB NVUBCMFDPOUFOU JNHVSMYYY VSMIUUQTLBONPCBDPOOQBTTDPNFWFOU ^ ^
"DUJPOαϯϓϧ // ϗετΞϓϦέʔγϣϯଆ let action = UNNotificationAction(identifier: "open", title: "Open",
options: []) let category = UNNotificationCategory(identifier: "Kanmoba", actions: [action], intentIdentifiers: [], options: []) UNUserNotificationCenter.current() .setNotificationCategories([category])
"DUJPOαϯϓϧ // Extensionଆ func didReceive(_ response: UNNotificationResponse, completionHandler completion: @escaping
(UNNotificationContentExtensionResponseOption) -> Void) { if response.actionIdentifier == "open" { if let url = response.notification.request.content.userInfo["url"] as? String { self.extensionContext?.open(URL(string: url)!, completionHandler: nil) } } completion(.dismiss) } &YUFOTJPOͰॲཧ͞Εͳ͍ʢϝιου͕ఆٛ͞Ε͍ͯͳ͍ʣ߹ ϗετʹ͞ΕΔʢΒ͍͠ʣ
/PUJpDBUJPO$POUFOU &YUFOTJPOΛͬͯ ϦονͳϢʔβମݧΛ