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
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
260
CSC305 Lecture 26
javiergs
PRO
0
140
Go の GC の不得意な部分を克服したい
taiyow
3
790
php-conference-japan-2024
tasuku43
0
320
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
Exploring: Partial and Independent Composables
blackbracken
0
100
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
210
선언형 UI에서의 상태관리
l2hyunwoo
0
170
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
Featured
See All Featured
A Tale of Four Properties
chriscoyier
157
23k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
GraphQLとの向き合い方2022年版
quramy
44
13k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
The Language of Interfaces
destraynor
154
24k
Docker and Python
trallard
42
3.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Music & Morning Musume
bryan
46
6.2k
Documentation Writing (for coders)
carmenintech
66
4.5k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
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ҙ֎ͱ؆୯ʹରԠͰ͖·͢ ɾͨͩ͠ɺϢʔβʔ͕ݟͨ͘ͳ͍ใදࣔ͠ͳ͍ͷ ɹɹΠϯΫϧʔγϒσβΠϯͷҙࣝେࣄ