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.2k
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
980
Other Decks in Programming
See All in Programming
C#/.NETのこれまでのふりかえり
tomokusaba
1
160
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
480
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
9
1k
Realtime API 入門
riofujimon
0
110
僕がつくった48個のWebサービス達
yusukebe
18
17k
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
Tuning GraphQL on Rails
pyama86
2
1k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
150
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
110
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
gopls を改造したら開発生産性が高まった
satorunooshie
8
240
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
430
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
How STYLIGHT went responsive
nonsquared
95
5.2k
Speed Design
sergeychernyshev
24
570
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Testing 201, or: Great Expectations
jmmastey
38
7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Scaling GitHub
holman
458
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
107
49k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
Code Reviewing Like a Champion
maltzj
519
39k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Docker and Python
trallard
40
3.1k
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Λͬͯ ϦονͳϢʔβମݧΛ