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
Notifications in iOS10
Search
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
400
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
690
ARKit3
toyship
4
7.6k
UIViewPropertyAnimator and Easing
toyship
2
1.2k
Other Decks in Technology
See All in Technology
見守りエージェントを作ってみた(ローカルLLM + Hermes Agent)
happysamurai294
0
110
SoccerMaster: A Vision Foundation Model for Soccer Understanding
kzykmyzw
0
140
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
AI時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
4
2.4k
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #kaigieffect_kaigi
sue445
PRO
0
150
CIで使うClaude
iwatatomoya
0
290
Devsumi 2026 Summer 人もAIも使える共通基盤を事業の加速装置にする~デザインシステム運用に学ぶ組織レバレッジ~ 渡辺 凌央
legalontechnologies
PRO
1
230
「早く出す」より「事業に効く」 ── 顧客の業務サイクルから逆算するAI時代の二重ループ開発と「変化の設計者」 / devsumi2026
rakus_dev
1
370
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
420
生成AI×AWS CDK×AWS FISで"振り返れる"ミニGameDayをつくろう
yoshimi0227
1
390
LLM/Agent評価:トップ営業の発言を「正解」にする 〜暗黙的正解による評価を営業資産に変える〜
takkuhiro
1
230
最適な自走を最小限の支援で — M&Aで拡大する組織で少人数SREが挑んだ1年 / SRE NEXT 2026
genda
0
1.5k
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
340
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
500
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
660
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
320
Raft: Consensus for Rubyists
vanstee
141
7.6k
Being A Developer After 40
akosma
91
590k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
260
Building Flexible Design Systems
yeseniaperezcruz
330
40k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Unsuck your backbone
ammeep
672
58k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
150
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Ͱ௨ͷ༰Λมߋ͢Δ͜ͱ͕Ͱ͖ΔΑ͏ʹͳͬͨͨ Ίɺॊೈͳ௨ઃܭ͕Ͱ͖ΔΑ͏ʹͳΓ·ͨ͠ • ແବͳ௨Λ;ͣ͞ɺ͢Ͱʹ͋Δ௨Λߋ৽͠Α͏ • ΞϓϦ௨ͰɺγεςϜ௨ը໘Λදࣔ͠Α͏