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
4k
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.3k
20190412 Android TV向けアプリを作ってみる
itok
0
990
Other Decks in Programming
See All in Programming
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
14 Years of iOS: Lessons and Key Points
seyfoyun
1
770
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
360
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
From Translations to Multi Dimension Entities
alexanderschranz
2
130
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
170
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
770
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
110
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
A Tale of Four Properties
chriscoyier
157
23k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Designing for Performance
lara
604
68k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Speed Design
sergeychernyshev
25
670
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Music & Morning Musume
bryan
46
6.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Code Review Best Practice
trishagee
65
17k
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Λͬͯ ϦονͳϢʔβମݧΛ