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
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
430
Custom Group Activities
toyship
3
1.5k
Synchronized iPhones, Again!
toyship
2
1.7k
ARKit4.pdf
toyship
1
2.4k
Custom Gesture Recognizer on iOS
toyship
3
1.5k
HEVC Video with Alpha Channel
toyship
1
1.3k
RealityKit & Reality Composer
toyship
3
710
ARKit3
toyship
4
7.7k
UIViewPropertyAnimator and Easing
toyship
2
1.2k
Other Decks in Technology
See All in Technology
AI時代に求められる優秀なTechLeadの振る舞い
pospome
11
15k
「いつか使う」の「いつか」は来ない 〜AI駆動開発における「作らない」判断について〜
ikki0006
0
170
An Introduction to Context Ontology Accelerator (teaching AI agents what your data means)
inariku
PRO
1
130
なぜ東京にいる私が、新潟の技術コミュニティを運営するのか by 八雲慎之助
yakumo
0
230
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
230
視野はAIに、視座は人に / ai-for-breadth-humans-for-perspective
nkzn
6
3.2k
セキュリティ専任チームなしで攻撃を先回りするSREが実践したSIEM on Amazon OpenSearch Service
cscengineer
PRO
0
620
Lint の層を組み直した話
bengo4com
3
330
The future of architectural work
ufried
0
190
会社説明資料_最新版
demaecan
0
32k
分析作業をどこまで任せるか自分で決められる AIネイティブBI『Golden Analytics』が 良さげな話 /golden-analytics-is-ai-native-bi
shinyaa31
0
130
超⼩型・多⾔語検索モデル Bekko Embedding
hotchpotch
1
120
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Designing Powerful Visuals for Engaging Learning
tmiket
1
650
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
70
68k
Utilizing Notion as your number one productivity tool
mfonobong
4
640
Bash Introduction
62gerente
615
220k
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
790
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
530
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
How to build a perfect <img>
jonoalderson
1
6.2k
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Ͱ௨ͷ༰Λมߋ͢Δ͜ͱ͕Ͱ͖ΔΑ͏ʹͳͬͨͨ Ίɺॊೈͳ௨ઃܭ͕Ͱ͖ΔΑ͏ʹͳΓ·ͨ͠ • ແବͳ௨Λ;ͣ͞ɺ͢Ͱʹ͋Δ௨Λߋ৽͠Α͏ • ΞϓϦ௨ͰɺγεςϜ௨ը໘Λදࣔ͠Α͏