Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
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
[FlutterKaigi2024] Effective Form 〜Flutterによる複雑なフォーム開発の実践〜
chocoyama
1
3.9k
社内活動の取り組み紹介 ~ スリーシェイクでこんな取り組みしてます ~
bells17
0
380
Arm移行タイムアタック
qnighy
0
400
事業成長を爆速で進めてきたプロダクトエンジニアたちの成功談・失敗談
nealle
3
1.2k
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
120
Modular Monolith Monorepo ~シンプルさを保ちながらmonorepoのメリットを最大化する~
yuisakamoto
11
3.9k
as(型アサーション)を書く前にできること
marokanatani
11
3k
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
1
570
Gestaltung digitaler Lösungen – Produktions- oder Designprozess?
techstories
0
120
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
3
410
CSC509 Lecture 13
javiergs
PRO
0
150
Full stack testing :: basic to basic
up1
1
860
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
480
What's in a price? How to price your products and services
michaelherold
243
12k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Making Projects Easy
brettharned
116
5.9k
Done Done
chrislema
181
16k
Designing for Performance
lara
604
68k
Statistics for Hackers
jakevdp
796
220k
4 Signs Your Business is Dying
shpigford
181
21k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
24k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
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ҙ֎ͱ؆୯ʹରԠͰ͖·͢ ɾͨͩ͠ɺϢʔβʔ͕ݟͨ͘ͳ͍ใදࣔ͠ͳ͍ͷ ɹɹΠϯΫϧʔγϒσβΠϯͷҙࣝେࣄ