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
510
Better use of SwiftUI
tattn
0
380
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
EventSourcingの理想と現実
wenas
6
2.3k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
660
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
Arm移行タイムアタック
qnighy
0
310
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
310
Realtime API 入門
riofujimon
0
150
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
870
Featured
See All Featured
Building Applications with DynamoDB
mza
90
6.1k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Side Projects
sachag
452
42k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Practical Orchestrator
shlominoach
186
10k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Gamification - CAS2011
davidbonilla
80
5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
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ҙ֎ͱ؆୯ʹରԠͰ͖·͢ ɾͨͩ͠ɺϢʔβʔ͕ݟͨ͘ͳ͍ใදࣔ͠ͳ͍ͷ ɹɹΠϯΫϧʔγϒσβΠϯͷҙࣝେࣄ