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.4k
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
4.1k
20210219 Flutterに入門してみた
itok
1
3.8k
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.4k
20190412 Android TV向けアプリを作ってみる
itok
0
990
Other Decks in Programming
See All in Programming
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
1.8k
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
8
1.9k
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
1.8k
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
180
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
0
140
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
140
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
390
DMMオンラインサロンアプリのSwift化
hayatan
0
190
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
280
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
For a Future-Friendly Web
brad_frost
176
9.5k
Building Adaptive Systems
keathley
38
2.4k
The Pragmatic Product Professional
lauravandoore
32
6.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
KATA
mclloyd
29
14k
YesSQL, Process and Tooling at Scale
rocio
170
14k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
GraphQLとの向き合い方2022年版
quramy
44
13k
Automating Front-end Workflow
addyosmani
1366
200k
Making the Leap to Tech Lead
cromwellryan
133
9k
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Λͬͯ ϦονͳϢʔβମݧΛ