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
iOS 10 Notifications
Search
hirayaCM
June 24, 2016
Programming
0
560
iOS 10 Notifications
iOS 10 の通知の新機能の概要について解説しました。
hirayaCM
June 24, 2016
Tweet
Share
Other Decks in Programming
See All in Programming
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
210
GitHub Copilotのススメ
marcy731
0
190
使ってみよう Azure AI Document Intelligence
kosmosebi
2
240
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
110
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
0
180
Ruby Function Composition
bkuhlmann
1
330
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
390
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
320
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
200
Designing for tomorrow's programming workflows
honnibal
PRO
2
120
ONE WEDGE_company_guide
1wedge_one
0
430
CQRS/ES avec Symfony, c’est (trop) bien !
jeremyfreeagent
1
640
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
15
1.4k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
The Mythical Team-Month
searls
215
42k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
15
2.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
29
46k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
10 Git Anti Patterns You Should be Aware of
lemiorhan
646
58k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
243
20k
Typedesign – Prime Four
hannesfritz
36
2.1k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
Building Adaptive Systems
keathley
30
1.9k
Transcript
iOS 10 Notifications AKIBA.swift #3 Shingo Hiraya @classmethod, Inc
User Notifications framework
User Notifications framework • iOS 10 ͰՃ • ϩʔΧϧɾϦϞʔτ௨ͷͨΊͷ framework
User Notifications framework • 19ݸͷΫϥε • UNUserNotificationCenter ← ϝΠϯ •
UNNotificationContent • UNNotificationTrigger • …
User Notifications framework • ௨Λ͏ํ๏ • iOS 9 Ҏલ •
UIApplication ͷػೳΛ༻ • iOS 10 Ҏ߱ • User Notifications framework ͷػೳΛ༻
User Notifications framework • ఏڙ͞ΕΔओͳػೳ (࣍ষҎ߱Ͱઆ໌) • ௨ͷ༻ڐՄϦΫΤετ • ௨ͷ࡞
• ௨ͷϋϯυϦϯά • etc …
௨ͷ༻ڐՄϦΫΤετ
௨ͷ༻ڐՄϦΫΤετ • ௨Λ༻͢ΔલʹϢʔβʔͷڐՄΛಘΔඞ ཁ͕͋Δ • ڐՄΛಘΔखॱ iOS 9 Ҏલͱେମಉ͡
※͜Ε iOS 9 ͷεΫγϣ
௨ͷ༻ڐՄϦΫΤετ • iOS 10 Ͱͷվળ • μΠΞϩάʹର͢Δૢ࡞ΛϋϯυϦϯάՄೳ ※͜Ε iOS
9 ͷεΫγϣ
௨ͷ࡞
ϩʔΧϧ௨ͷ࡞ (iOS 10 Ҏ߱) 1. Content ͱ Trigger ͔Β Request
࡞ Request $POUFOU 5SJHHFS
ϩʔΧϧ௨ͷ࡞ (iOS 10 Ҏ߱) 1. Content ͱ Trigger ͔Β Request
࡞ • Content : λΠτϧɺຊจͳͲ Request $POUFOU 5SJHHFS
ϩʔΧϧ௨ͷ࡞ (iOS 10 Ҏ߱) 1. Content ͱ Trigger ͔Β Request
࡞ • Trigger : ௨ͷൃՐ݅ • ࢦఆ࣌ؒޙ or ࢦఆ࣌ or ࢦఆॴ Request $POUFOU 5SJHHFS
ϩʔΧϧ௨ͷ࡞ (iOS 10 Ҏ߱) 1. Content ͱ Trigger ͔Β Request
࡞ 2. UNUserNotificationCenter ʹ Request Ճ Request $POUFOU 5SJHHFS UNUserNotification Center
ϦϞʔτ௨ͷ࡞ • iOS 9 Ҏલͷखॱͱಉ༷ • ূ໌ॻɺσόΠετʔΫϯऔಘɺૹ৴खॱ 4FSWFS4JEF"QQ J04"QQ
"1/T 6*"QQMJDBUJPO τʔΫϯ ϖΠϩʔυ
௨ͷϋϯυϦϯά
௨ͷϋϯυϦϯά • ର: ϩʔΧϧ௨ɾϦϞʔτ௨ • ϋϯυϦϯάՄೳͳΠϕϯτ • ௨ͷड৴ (ΞϓϦ͕ foreground
ͷ߹) • ௨Λλοϓͯ͠ΞϓϦΛىಈ • etc …
௨ͷϋϯυϦϯάํ๏ • iOS 9 Ҏલ • UIApplicationDelegate ͷϝιουΛ༻ • iOS
10 Ҏ߱ • UNUserNotificationCenterDelegate ͷϝ ιουΛ༻
༻͢Δϝιουͷύλʔϯ iOS 9 Ҏલ Πϕϯτ ΞϓϦͷঢ়ଶ ௨ͷछྨ ϝιου Foreground
Background Suspended Local Remote ௨ͷड৴ ̋ - - ̋ - application(UIApplication, didReceive: UILocalNotification) ̋ - - - ̋ application(UIApplication, didReceiveRemoteNotification: [NSObject : AnyObject]) ௨͔Βͷ ىಈ - ̋ - ̋ - application(UIApplication, didReceive: UILocalNotification) - ̋ - - ̋ application(UIApplication, didReceiveRemoteNotification: [NSObject : AnyObject]) - - ̋ ̋ ̋ application(_:didFinishLaunching WithOptions:)
༻͢Δϝιουͷύλʔϯ iOS 9 Ҏલ Πϕϯτ ΞϓϦͷঢ়ଶ ௨ͷछྨ ϝιου Foreground
Background Suspended Local Remote ௨ͷड৴ ̋ - - ̋ - application(UIApplication, didReceive: UILocalNotification) ̋ - - - ̋ application(UIApplication, didReceiveRemoteNotification: [NSObject : AnyObject]) ௨͔Βͷ ىಈ - ̋ - ̋ - application(UIApplication, didReceive: UILocalNotification) - ̋ - - ̋ application(UIApplication, didReceiveRemoteNotification: [NSObject : AnyObject]) - - ̋ ̋ ̋ application(_:didFinishLaunching WithOptions:) ΞϓϦͷঢ়ଶɺ௨ͷछྨʹΑͬͯ ༻͢ΔϝιουΛ͍͚͍ͯͨ…
༻͢Δϝιουͷύλʔϯ iOS 10 Ҏ߱ Πϕϯτ ΞϓϦͷঢ়ଶ ௨ͷछྨ ϝιου Foreground
Background Suspended Local Remote ௨ͷड৴ ̋ - - ̋ ̋ userNotificationCenter(_:willPres ent:withCompletionHandler:) ௨͔Βͷ ىಈ - ̋ ̋ ̋ ̋ userNotificationCenter(_:didRece ive:withCompletionHandler:)
༻͢Δϝιουͷύλʔϯ iOS 10 Ҏ߱ Πϕϯτ ΞϓϦͷঢ়ଶ ௨ͷछྨ ϝιου Foreground
Background Suspended Local Remote ௨ͷड৴ ̋ - - ̋ ̋ userNotificationCenter(_:willPres ent:withCompletionHandler:) ௨͔Βͷ ىಈ - ̋ ̋ ̋ ̋ userNotificationCenter(_:didRece ive:withCompletionHandler:) ΠϕϯτͷछྨʹΑͬͯ 2ͭͷϝιουΛ͍͚Δ͚ͩ!
·ͱΊ
·ͱΊ • iOS 10 Ͱ௨ͷͨΊͷϑϨʔϜϫʔΫՃ • User Notifications framework •
iOS 9 Ҏલ : UIApplication ͷػೳΛ༻ • iOS 10 Ҏ߱ : User Notifications framework ͷ ػೳΛ༻
ࢀߟࢿྉ • API Reference • User Notifications framework • WWDC
2016 Session • “Introduction to Notifications”
ؔ࿈ใ • Developers.IO • iOS User Notifications framework Series •
۩ମతͳ࣮ͳͲΛղઆ
Thank you!