Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Notifications in iOS10
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Tachibana Kaoru
July 21, 2016
Technology
2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Notifications in iOS10
Tachibana Kaoru
July 21, 2016
More Decks by Tachibana Kaoru
See All by Tachibana Kaoru
GeoLocationAnchor and MKTileOverlay
toyship
0
410
Custom Group Activities
toyship
3
1.5k
Synchronized iPhones, Again!
toyship
2
1.7k
ARKit4.pdf
toyship
1
2.3k
Custom Gesture Recognizer on iOS
toyship
3
1.5k
HEVC Video with Alpha Channel
toyship
1
1.3k
RealityKit & Reality Composer
toyship
3
700
ARKit3
toyship
4
7.7k
UIViewPropertyAnimator and Easing
toyship
2
1.2k
Other Decks in Technology
See All in Technology
The Knowledge Spine: A Machine-Executable Ontology for Governed Marketing Activation
vananth22
0
110
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
870
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
映像変換サーバーなしで端末内でHLSを生成してライブ配信
hikarusato
0
130
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
CLIライブラリ開発を支える技術
htnabe
0
140
SREは、MCPとAutopilotをこう使え!
kazumax55
3
910
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
9
4.7k
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
220
ソフトウェアDNAとクラウドエージェントのススメ
cloudace
0
120
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
250
品質と信頼性を地続きにする
grimoh
2
820
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
470
Paper Plane (Part 1)
katiecoart
PRO
2
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
The agentic SEO stack - context over prompts
schlessera
0
940
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Designing for Performance
lara
611
70k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.1k
Transcript
No#fica#ons in iOS10 2016/07/21 @TachibanaKaoru
ࣗݾհ ϑϦʔϥϯεͷiOSΤϯδχΞΛ͍ͯ͠· ͢ɻ (20168݄͔Βʂ) • Twi%er: @TachibanaKaoru • Blog :
h%p:/ /www.toyship.org/ • ϘϧμϦάϯ͖
What's new in No.fica.on of iOS • ௨ʹ"tle/sub"tle͕͚ͭΒΕΔΑ͏ʹͳͬͨ • ௨ʹΠϝʔδը૾͕͚ͭΒΕΔΑ͏ʹͳͬͨ
• ௨ʹCustom UI͕͚ͭΒΕΔΑ͏ʹͳͬͨ • Ϣʔβʔ͕௨ΛڐՄ͔ͨ͠Ͳ͏͔ͷઃఆ͕ͱΕΔΑ͏ʹͳͬ ͨ • ৴ɾະ৴ͷ௨Λ؆୯ʹϋϯυϦϯάͰ͖ΔΑ͏ʹͳͬͨ
৴ɾະ৴ͷ௨Λ؆୯ʹϋϯυ ϦϯάͰ͖ΔΑ͏ʹͳͬͨ
Local No(fica(onͱRemote No(fica(on͕౷ Ұ͞Ε·ͨ͠ɻ
Remote No(fica(on { "aps" : { "alert" : { "title"
: "Introduction to Notifications", "subtitle" : "Session 707", "body" : "Woah! These new notifications look amazing!" }, "badge" : 1 }, }
Local No(fica(on let center = UNUserNotificationCenter.current() let content = UNMutableNotificationContent()
content.title = "Hello" content.body = "This is a big news!" content.sound = UNNotificationSound.default() let trigger = UNTimeIntervalNotificationTrigger.init(timeInterval: 10, repeats: false) let request = UNNotificationRequest.init( identifier: "NewsUpdate", // ͜ͷIDΛΩʔʹͯ͠আฤूΛ͠·͢ content: content, trigger: trigger) center.add(request)
௨ͷཧ ·ͣɺ௨ͷঢ়ଶʹԼهͷ͕̏ͭ͋Γ·͢ɻ • Pending : ·ͩൃՐ͍ͯ͠ͳ͍௨ • Delivered : ൃՐ͕ͨ͠ɺϢʔβʔ͕ॲཧʢλοϓͳͲʣΛͯ͠
͍ͳ͍௨ • (Read) : Ϣʔβʔ͕ॲཧΛͨ͠௨ɹʢ͜ͷঢ়ଶͷ௨औಘͰ ͖·ͤΜɻʣ
௨ͷঢ়ଶભҠ • ొ͞Εͨ௨ɺPendingঢ়ଶͱͳΔ • τϦΨʔΠϕϯτʢ࣌ؒҐஔͳͲʣʹΑΓൃՐͯ͠Delivered ঢ়ଶͱͳΔ • Ϣʔβʔ͕ॲཧΛ͢ΔͱReadͱͳΓɺ UNUserNo2fica2onCenter͔ΒऔಘͰ͖ͳ͘ͳΔ
get pending no*fica*ons UNUserNotificationCenter.current().getPendingNotificationRequests { requests in print("== Pending Notification
: \(requests.count) == ") for request in requests { request.identifier request.content.title request.content.subtitle request.content.body request.trigger print(" -- title : \(request.content.title) body:\(request.content.body)") } }
delete pending no+fica+ons //ಛఆͷpending௨Λফ͢ UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: ["NewsUpdate","NewsDelivery"]) //શ෦ͷpending௨Λফ͢ UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
update pending no,fica,ons // ৽͍͠contentΛͭ͘Δ let content = UNMutableNotificationContent() content.title
= "Hello" content.body = "This is a more big news!" content.sound = UNNotificationSound.default() let trigger = UNTimeIntervalNotificationTrigger.init(timeInterval: 5, repeats: false) // ৽͍͠requestΛͭ͘Δ let newRequest = UNNotificationRequest.init(identifier: "NewsUpdate", content: content, trigger: trigger) // ৽͍͠requestΛͭ͘Δʢݹ͍ͷΛdelete͢Δඞཁͳ͍ʣ UNUserNotificationCenter.current().add(newRequest) { error in // error }
get delivered no,fica,ons UNUserNotificationCenter.current().getDeliveredNotifications { notifications in // [UNNotification]) print("==
Delivred Notification : \(notifications.count) == ") for notification in notifications { notification.date notification.request print(" -- title : \(notification.request.content.title) body:\(notification.request.content.body) date: \(notification.date)") } }
delete delivered no+fica+ons //ಛఆͷdeliver͞Εͨ௨Λফ͢ UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: ["NewsUpdate","NewsDelivery"]) //શ෦ͷdeliver͞Εͨ௨Λফ͢ UNUserNotificationCenter.current().removeAllDeliveredNotifications()
No#fica#on in ac#on • ΞϓϦ͕ Foregroundʹ͋Δঢ়ଶͰ௨͕৴͞Εͨ߹ʹɺγ εςϜͷ௨ը໘ΛͩͤΔΑ͏ʹͳΓ·ͨ͠ɻ func userNotificationCenter(_ center:
UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: (UNNotificationPresentationOptions) -> Void) { print("! Notification came!\(notification.request.content.title)") completionHandler([.alert, .sound])// ͜ΕΛ͍Ε͓ͯ͘ͱɺγεςϜͷ௨ը໘Λͩͯ͘͠ΕΔ }
iOS9ͱiOS10ͷ௨ϋϯυϦϯάͷҧ͍ • Fav௨ • iOS9·ͰɺFav͞ΕΔͨͼʹ௨͕͘ΔͷͰɺ௨ཝ͕ಛ ఆͷtweetͷFav௨Ͱ͏·ͬͯ͠·ͬͨ • iOS10ͰɺFav͞ΕΔͨͼʹ௨Λߋ৽͢ΔͨΊɺಛఆͷ tweetͷFav௨ৗʹҰͭ
iOS9ͱiOS10ͷ௨ϋϯυϦϯάͷҧ͍ • ίϝϯτ௨ • iOS9·Ͱɺίϝϯτ͕ͭͨ͘ͼʹ௨Λૹ͍ͬͯͨͨΊɺ Γ͕͍͋ͬͯΔεϨουͷίϝϯτ௨Ͱ͏·ͬͯ͠·ͬ ͨ • iOS10Ͱɺίϝϯτ͕ͭͨ͘ͼʹ௨Λߋ৽͢ΔͨΊɺಛ ఆͷεϨουͷ௨ৗʹҰͭ
·ͱΊ • iOS10Ͱ௨ͷ༰Λมߋ͢Δ͜ͱ͕Ͱ͖ΔΑ͏ʹͳͬͨͨ Ίɺॊೈͳ௨ઃܭ͕Ͱ͖ΔΑ͏ʹͳΓ·ͨ͠ • ແବͳ௨Λ;ͣ͞ɺ͢Ͱʹ͋Δ௨Λߋ৽͠Α͏ • ΞϓϦ௨ͰɺγεςϜ௨ը໘Λදࣔ͠Α͏