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
Widget Suggestions 対応と ヤフーの新OS対応
Search
Tatsuya Tanaka
November 02, 2021
Programming
1
1.2k
Widget Suggestions 対応と ヤフーの新OS対応
ヤフー × LINE iOS Meetup
https://line.connpass.com/event/228428/
#iOS_meetup
Tatsuya Tanaka
November 02, 2021
Tweet
Share
More Decks by Tatsuya Tanaka
See All by Tatsuya Tanaka
iPhoneのセンサー情報をmacOSアプリでリアルタイム活用するための技術
tattn
1
520
Better use of SwiftUI
tattn
0
390
Swift Concurrencyによる安全で快適な非同期処理
tattn
2
1.1k
iOSアプリの技術選択2022
tattn
7
3.7k
WidgetKitで良い体験を作るには / Good experience with WidgetKit
tattn
2
1.5k
既存アプリにSwiftUIをどう組み込んでいくか
tattn
8
2.3k
iOS 14からのアプリ内課金
tattn
5
2.7k
iOS 14の位置情報系アップデート
tattn
0
22k
SwiftUIと比較してみた時のFlutter
tattn
4
1.7k
Other Decks in Programming
See All in Programming
たのしいparse.y
ydah
3
120
Jakarta EE meets AI
ivargrimstad
0
230
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
250
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
690
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
快速入門可觀測性
blueswen
0
330
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
110
Symfony Mapper Component
soyuka
2
730
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
Featured
See All Featured
Unsuck your backbone
ammeep
669
57k
Code Reviewing Like a Champion
maltzj
520
39k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Fireside Chat
paigeccino
34
3.1k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Documentation Writing (for coders)
carmenintech
66
4.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
How STYLIGHT went responsive
nonsquared
95
5.2k
A better future with KSS
kneath
238
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Transcript
©︎ 2021 Yahoo Japan Corporation All rights reserved. Widget SuggestionsରԠͱ
Ϡϑʔͷ৽OSରԠ Tatsuya Tanaka / ాத ୡ Ϡϑʔ × LINE iOS Meetup #iOS_meetup
©︎ 2021 Yahoo Japan Corporation All rights reserved. ాத ୡ
/ ͨͳͨͭ • Ϡϑʔגࣜձࣾ ɹɾiOSΞϓϦͷԣஅత։ൃٕज़త՝ͷղܾ ɹɾiOSΞϓϦࠇଳ @tattn @tanakasan2525 @tattn ※ࠇଳ੍ͱɿ֤ྖҬʹ͓͍ͯಥग़ͨ͠ઐੑΛ࣋ͭࣾһΛࠇଳͱ໋ͯ͠͠ɺࣾ֎ʹ͓͚Δ׆ಈΛձࣾͱͯ͠ࢧԉ͢Δ੍
©︎ 2021 Yahoo Japan Corporation All rights reserved. iOSDCͰΟδΣοτͷΛ͠·ͨ͠ IUUQTGPSUFFKQJPTEDKBQBOQSPQPTBMDBGDDBBCCBDBBD
ಈը εϥΠυ
©︎ 2021 Yahoo Japan Corporation All rights reserved. ͜ͷ෦ʹ͍ͭͯͤͳ͔ͬͨ͜ͱΛ͠·͢
©︎ 2021 Yahoo Japan Corporation All rights reserved. γεςϜͱͷ࿈ܞ
©︎ 2021 Yahoo Japan Corporation All rights reserved. γεςϜʹΑΔΞϓϦͷϨίϝϯυ Siri͔ΒͷఏҊͱͯ͠ΞϓϦͷػೳૌٻ͕Ͱ͖Δ
ϩοΫը໘ͰͷSiri͔ΒͷఏҊ ΫΠοΫϝϞ (Quick Note) εϙοτϥΠτͰͷ Siri͔ΒͷఏҊ
©︎ 2021 Yahoo Japan Corporation All rights reserved. ΟδΣοτͱγεςϜͷ࿈ܞ Smart
Rotate ಛఆͷ࣌ؒʹ εϚʔτελοΫΛճసͤͯ͞ ΟδΣοτΛදࣔ͢Δ (iOS 14)
©︎ 2021 Yahoo Japan Corporation All rights reserved. ΟδΣοτͱγεςϜͷ࿈ܞ Widget
Suggestions εϚʔτελοΫʹ ઃஔ͞Ε͍ͯͳ͍ΟδΣοτΛ ͓͢͢Ίͱͯ͠Ծઃஔ͢Δ (iOS 15)
©︎ 2021 Yahoo Japan Corporation All rights reserved. ΟδΣοτͱγεςϜͷ࿈ܞ Widget
Suggestions (iOS 15) Smart Rotate (iOS 14) "EEJOUFMMJHFODFUPZPVSXJEHFUT88%$7JEFPT IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED Apple͜ΕΒΛIntelligence (ੑ) ͱݺΜͰ͍Δ
©︎ 2021 Yahoo Japan Corporation All rights reserved. Widget Suggestions
©︎ 2021 Yahoo Japan Corporation All rights reserved. Widget Suggestions
(ΟδΣοτͷఏҊ) εϚʔτελοΫʹઃஔ͞Ε͍ͯͳ͍ΟδΣοτΛ ͓͢͢Ίͱͯ͠Ծઃஔ͢Δ ΟδΣοτͷఏҊʹΑͬͯදࣔ͞ΕͨΟδΣοτʹ ಛผͳϝχϡʔ͕Ճ͞ΕΔ
©︎ 2021 Yahoo Japan Corporation All rights reserved. Widget Suggestionsͷ࣮ํ๏
࣮ํ๏2ͭ ɾINRelevantShortcut ɾINInteraction
©︎ 2021 Yahoo Japan Corporation All rights reserved. INInteraction Intent
is eligible for Siri SuggestionsͷνΣοΫ͕ඞਢ
©︎ 2021 Yahoo Japan Corporation All rights reserved. INInteraction let
intent = ConfigurationIntent() intent.ϓϩύςΟ = දࣔʹඞཁͳΛઃఆ let interaction = INInteraction(intent: intent, response: nil) interaction.donate { error in } Ҏ্ɺͱͯ؆୯ʂ γεςϜֶ͕शΛͯ͠ɺదͳλΠϛϯάͰαδΣετͯ͘͠ΕΔ
©︎ 2021 Yahoo Japan Corporation All rights reserved. INInteraction ←ͷΑ͏ʹγϣʔτΧοτͷఏҊ
Siri Watch FaceͳͲʹදࣔ͞ΕΔͷͰҙ (ඞཁʹԠͯ͡ϧʔςΟϯάͷ࣮͕ඞཁ)
©︎ 2021 Yahoo Japan Corporation All rights reserved. INRelevantShortcut (IntentCon
fi guration) let intent = ConfigurationIntent() intent.ϓϩύςΟ = දࣔʹඞཁͳΛઃఆ let shortcut = INShortcut(intent: intent) let relevantShortcut = INRelevantShortcut(shortcut: shortcut) relevantShortcut.shortcutRole = .information relevantShortcut.widgetKind = "AwesomeWidget" // ରͷΟδΣοτͷKindΛઃఆ͢Δ // ۭͷྻʹͨ͠߹ΞϓϦͷར༻ঢ়گ͔ΒγεςϜ͕Α͠ͳʹαδΣετλΠϛϯάΛܾΊΔ relevantShortcut.relevanceProviders = [ INDateRelevanceProvider(start: Date(), end: Date(timeIntervalSinceNow: 60 * 30)), ] INRelevantShortcutStore.default.setRelevantShortcuts([relevantShortcut]) { error in } ͲͷظؒʹαδΣετ͢Δ͔Λઃఆ͢Δ
©︎ 2021 Yahoo Japan Corporation All rights reserved. INRelevantShortcut (StaticCon
fi guration) let activity = NSUserActivity(activityType: "sample.WidgetSuggestions.suggest") activity.title = "Widget suggestions app" let shortcut = INShortcut(userActivity: activity) let relevantShortcut = INRelevantShortcut(shortcut: shortcut) NSUserActivity͔ΒINShortcutΛͭ͘Δ
©︎ 2021 Yahoo Japan Corporation All rights reserved. INRelevanceProviderͷ੍ let
relevantShortcut = INRelevantShortcut(shortcut: shortcut) relevantShortcut.relevanceProviders = [ INDateRelevanceProvider(start: Date(), end: Date(timeIntervalSinceNow: 60 * 30)), ] ↓ଞʹศརͦ͏ͳͷ͕ఏڙ͞Ε͍ͯ·͕͢ɺ ͜ΕΒWatchͷͨΊͷػೳͰɺΟδΣοτʹ͑·ͤΜɻ ΞϯυΩϡϝϯτͰWWDCͷηογϣϯͰͷΈݴٴ͞Ε͍ͯΔͷͰҙ͠·͠ΐ͏ INDailyRoutineRelevanceProvider(situation: .morning), INLocationRelevanceProvider(region: CLCircularRegion( center: CLLocationCoordinate2D(latitude: 35.652832, longitude: 139.839478), radius: 1000, identifier: "Tokyo, Japan") ) IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED
©︎ 2021 Yahoo Japan Corporation All rights reserved. Ϡϑʔͷ৽OSରԠ
©︎ 2021 Yahoo Japan Corporation All rights reserved. ࣾWWDCใࠂձ ֤ͷઐՈ
৽ػೳʹڵຯͷ͋ΔΤϯδχΞ͕ രͰࣾใࠂձΛ։࠵ (σϞͳͲΛަ࣮͑ͨફతͳ༰) ࣌ؒ τϐοΫ ɹ 4XJGU$PODVSSFODZ ɹ 6*,JU ɹ 4XJGU6* ɹ 8JEHFU ɹ 4IBSF1MBZ ɹ 4BGBSJ&YUFOTJPO ɹ 9DPEF ɹ ௨ ɹ $PSF.-$SFBUF.- ɹ 7JTJPO ɹ ηΩϡϦςΟϩάΠϯ ɹ ϓϥΠόγʔ ɹ "QQ4UPSF ࠓ3࣌ؒʂʂ
©︎ 2021 Yahoo Japan Corporation All rights reserved. #ios15νϟϯωϧ /
ԣஅ։ൃνʔϜ φϨοδ͕νʔϜͰด͡ͳ͍Α͏ʹ #ios15νϟϯωϧͰࢼͨ͜͠ͱ٧·ͬͨ͜ͱͳͲԣల։ ͞Βʹ৽ػೳͷ։ൃϦιʔεΛิ͏ͨΊɺ ԣஅ։ൃνʔϜ͕αϯϓϧίʔυΛ࡞ͨ͠Γɺ ϖΞϓϩͳͲͰ։ൃͷαϙʔτΛ͢Δମ੍
©︎ 2021 Yahoo Japan Corporation All rights reserved. ·ͱΊ
©︎ 2021 Yahoo Japan Corporation All rights reserved. ·ͱΊ ɾγεςϜͱͷ࿈ܞେͰ͢
ɾWidget Suggestionsҙ֎ͱ؆୯ʹରԠͰ͖·͢ ɾͨͩ͠ɺϢʔβʔ͕ݟͨ͘ͳ͍ใදࣔ͠ͳ͍ͷ ɹɹΠϯΫϧʔγϒσβΠϯͷҙࣝେࣄ