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
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
flutterkaigi_2024.pdf
kyoheig3
0
150
CSC509 Lecture 09
javiergs
PRO
0
140
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Realtime API 入門
riofujimon
0
150
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
How STYLIGHT went responsive
nonsquared
95
5.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Visualization
eitanlees
145
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Building Applications with DynamoDB
mza
90
6.1k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Why Our Code Smells
bkeepers
PRO
334
57k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
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ҙ֎ͱ؆୯ʹରԠͰ͖·͢ ɾͨͩ͠ɺϢʔβʔ͕ݟͨ͘ͳ͍ใදࣔ͠ͳ͍ͷ ɹɹΠϯΫϧʔγϒσβΠϯͷҙࣝେࣄ