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
SiriKit and Me
Search
Tachibana Kaoru
September 15, 2017
Technology
0
2.8k
SiriKit and Me
iOSDC2017
Tachibana Kaoru
September 15, 2017
Tweet
Share
More Decks by Tachibana Kaoru
See All by Tachibana Kaoru
GeoLocationAnchor and MKTileOverlay
toyship
0
290
Custom Group Activities
toyship
3
1.3k
Synchronized iPhones, Again!
toyship
2
1.4k
ARKit4.pdf
toyship
1
2.1k
Custom Gesture Recognizer on iOS
toyship
3
1.3k
HEVC Video with Alpha Channel
toyship
1
1.1k
RealityKit & Reality Composer
toyship
3
490
ARKit3
toyship
4
7k
UIViewPropertyAnimator and Easing
toyship
2
940
Other Decks in Technology
See All in Technology
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Lexical Analysis
shigashiyama
1
150
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
760
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
170
TypeScript、上達の瞬間
sadnessojisan
46
13k
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
How STYLIGHT went responsive
nonsquared
95
5.2k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Bash Introduction
62gerente
608
210k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Faster Mobile Websites
deanohume
305
30k
Building Adaptive Systems
keathley
38
2.3k
What's new in Ruby 2.0
geeforr
343
31k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Done Done
chrislema
181
16k
Transcript
SIRIKIT AND ME 2017/9/15 IOSDC 2017
SIRIKIT AND ME ࣗݾհ ▸ @TachibanaKaoru ▸ ϑϦʔϥϯε iOSΤϯδχΞ ▸
ϘϧμϦϯά͕͖Ͱɺ࠷ۙϦʔυΫϥΠϛϯά νϟϨϯδதɻ ▸ Blog : http://www.toyship.org/
WHAT IS SIRIKIT?
SIRIKIT AND ME SIRIKIT ▸ iOS10͔Β ▸ Siri Map
CarPlay ͳͲͷγεςϜΞϓϦ͔Βݺͼ ग़͞ΕɺࣗͷΞϓϦΛ࿈ܞͰ͖Δػೳ ▸ ࣮Ͱ͖ΔͷಛఆͷػೳʹݶΒΕ·͢
SIRIKIT AND ME SIRIKITͰ࣮Ͱ͖Δػೳ ▸ VoIP Calling ▸ Messaging ▸
Payments ▸ Lists and Notes ▸ Visual Codes ▸ Photos ‣ Workouts ‣ Ride Booking ‣ Car Commands ‣ CarPlay ‣ Restaurant Reservation
SIRIKIT AND ME RIDE BOOKING ▸ λΫγʔͷं ▸ Siri͔ΒͱMap͔ΒλΫγʔΛΑͿ͜ͱ͕Ͱ͖·͢ ▸
શࠃλΫγʔɺUber͕ରԠ͍ͯ͠·͢
TEXT ▸ (SiriΛͬͯશࠃλΫγʔΞϓϦͰλΫγʔΛΑΜͩө૾)
SIRIKIT AND ME MESSAGING ▸ ϝοηʔδૹ৴ ▸ Siri͔ΒϝοηʔδΛૹΔ͜ͱ͕Ͱ͖Δɻ ▸ LINE͕ରԠ
TEXT ▸ ʢLINEΛͬͯϝοηʔδΛૹͬͨө૾ʣ
SIRIKIT AND ME RESTAURANT RESERVATIONS ▸ Ϩετϥϯͷ༧ ▸ Map͔ΒϨετϥϯΛ༧͢Δ͜ͱ͕Ͱ͖·͢ɻ ▸
OpenTable͕ରԠ
WHY SIRIKIT?
SIRIKIT AND ME LINE TO THE APP ▸ ༻සͷߴ͍γεςϜΞϓϦέʔγϣϯ͔Βࣗ ͷΞϓϦͷಈઢΛ֬อ͢Δ͜ͱ͕Ͱ͖Δɻ
SIRIKIT AND ME ACCECIBILITY ▸ UIControlɺ͕ݟ͑ͳ͍ਓͷྀΛߴΊ͍ͯ·͕͢ɺݸʑͷΞϓϦͷର Ԡ·ͩ·ͩेͱݴ͑·ͤΜɻ ▸ SiriKitΛ࣮͢ΔͱɺΞϓϦͷUI͕ࢹ֮োऀʹෳࡶ͗͢Δ߹ͰɺSiri͔Β ͑ΔΑ͏ʹͳΓ·͢ɻ
SIRIKIT AND ME ACCECIBILITY ▸ உࢠࣾɹୈेɿ͕ݟ͑ͳ͘ͳͬͨʲલ ฤʳ ▸ ओਓެ͕ேى͖Δͱಥવ͕ݟ͑ͳ͘ͳΔγʔ ϯ͕͋Γɺ
Siri ʹॿ͚ΛٻΊΔɻ ▸ Ҿ༻ݩ ▸ https://comic.pixiv.net/works/2930
SIRIKIT AND ME INTERNATIONALIZATION ▸ SiriKitʹରԠ͍ͯ͠Δͱɺ͠ຊମͷΞϓϦ͕ຊ ޠͷΈͷରԠͷ߹ʹɺSiriKitͰରԠ͍ͯ͠Δݴ ޠ͔ΒΑͿ͜ͱ͕Ͱ͖·͢ɻ ▸ ΞϥϏΞޠɺϔϒϥΠޠͳͲ͔Β͑Δ……ͱࢥ
͍·͢ɻʢಈ࡞ະ֬ೝʣ
None
SIRIKIT AND ME HOMEPOD ▸ ݱঢ়ͰHomePodʹΞϓϦରԠൃද͞Ε͍ͯ ·ͤΜ͕ɺᗐͳઓ͍͕܁Γ͛ΒΕ͍ͯΔε ϚʔτεϐʔΧʔքͰɺαʔυύʔςΟʔͷ๛ ͳΞϓϦʹରԠͰ͖Δརେ͖͍ɻ ▸
͓ͦΒ࣍͘ͷWWDCͰɺHomePodͷΞϓ ϦରԠ͕ൃද͞ΕΔͣɻ ▸ HomePodʹରԠͰ͖ΔͷɺSiriKitʹରԠͯ͠ ͍ΔΞϓϦʹͳΔͰ͠ΐ͏ɻ
HOW TO SIRIKIT
SIRIKIT AND ME FRAMEWORK FOR SIRIKIT ▸ ࣮ SiriKit ͱ͍͏ϑϨʔϜϫʔΫ͋Γ·ͤΜɻ
▸ Intents SiriKitͷϩδοΫ෦Λ୲͢ΔϑϨʔϜϫʔΫ ▸ Intents UI SiriKitͷUI෦Λ୲͢ΔϑϨʔϜϫʔΫ
SIRIKIT AND ME ADD INTENTS TARGET ▸ Host AppΛ࡞ΓɺͦΕʹ Intents
λʔήοτΛՃ͠·͢ɻ
SIRIKIT AND ME ADD CODES TO TARGET ▸ IntentsϑϨʔϜϫʔΫΛՃ͢ΔͱɺՃ͞ΕͨϑΝΠϧͷதʹ Message
IntentsʹରԠ͢ΔͨΊͷαϯϓϧίʔυ͕ॻ͍ͯ͋Γ·͢ɻMessage Intents ͩͬͨΒɺ͜Εʹ͕ͨͬͯ͠هड़͢ΕେৎͰ͢ɻ ▸ ΄͔ͷIntentsͷ߹ʹɺରԠ͢ΔΫϥεΛ࣮͠·͢ɻ ▸ ͦͷIntents Target͕ͲͷIntentsʹରԠ͢Δͷ͔IntentsͷInfo.plistΛࢀরͯ͘͠ ͍ͩ͞ɻ
STRUGGLE WITH SIRIKIT
SIRIKIT AND ME ▸ SiriKitͰͷ։ൃʹɺଟ͘ͷࠔϙΠϯτ͕͋Γ·͕͢ɺදతͳͷʹ͍ͭ ͯΈͯΈ·͠ΐ͏ɻ STRUGGLE WITH SIRIKIT
SIRIKIT AND ME EXTENSION ▸ SiriKitApp ExtensionͷҰछͰ͢ɻ ▸ App ExtensioniOS8͔Βհ͞ΕͨɺγεςϜͷػೳΛݸผͷΞϓϦͰ֦ு͢
ΔͨΊͷΈͰ͢ɻ ▸ Today ExtensionɺCusom KeyboardɺͳͲɺiOS11Ͱ23ݸͷApp Extension ͕͋Γ·͢ɻ
SIRIKIT AND ME EXTENSION ▸ App ExtensionɺΞϓϦͷ࣌ʹ Host App ͷBundleʹؚ·Ε·͢ɻ
▸ ͔͠͠ɺApp ExtensionͷϓϩηεɺHost AppͱผʹͳΓ·͢ɻ
SIRIKIT AND ME EXTENSION - MEMORY ▸ iOSͰϝϞϦʔۭؒͷΞΫηε͕ϓϩηε͝ͱʹ੍ݶ͞Ε͍ͯ·͢ɻ ▸ ͋ΔϓϩηεͰ֬อ͞Ε͍ͯΔϝϞϦʔɺଞͷϓϩηε͔ΒݟΔ͜ͱ͕Ͱ͖·
ͤΜɻ
SIRIKIT AND ME EXTENSION - MEMORY ▸ ଞͷϓϩηεͰ֬อ͞Ε͍ͯΔϝϞϦʔΛࢀর͢ΔͱͲ͏ͳΔ͔Λ̎ͭͷΞϓϦ Λ࡞ͬͯͨΊͯ͠Έ·͠ΐ͏ɻ
SIRIKIT AND ME EXTENSION - MEMORY ▸ ·ͣɺAppleͱ Orangeͱ͍͏ೋͭͷΞϓϦΛ࡞Γ·͢ɻ ▸
AppleΞϓϦͰɺIntϙΠϯλΛ֬อ͠ɺͦ͜ʹʮ12345ʯΛ͍Ε·͢ɻ ▸ ͦͷIntϙΠϯλͷΞυϨεΛهɻ let ApplePtr = UnsafeMutablePointer<Int>.allocate(capacity:1) ApplePtr.pointee = 12345 let AppleValue = ApplePtr.pointee print(ApplePtr) // 0x00000001c0013570 print(AppleValue) // 12345
SIRIKIT AND ME EXTENSION - MEMORY ▸ OrangeΞϓϦΛىಈ͠·͢ɻʢApple ΞϓϦόοΫάϥϯυঢ়ଶͱͳΓ· ͢ʣ
▸ ͦ͜Ͱɺ͖͞΄ͲAppleΞϓϦͰ֬อͨ͠IntϙΠϯλͷதΛ֬ೝɻ ▸ தʮ0ʯͱͳΓ·͢ɻʢ͖͞΄ͲAppleΞϓϦͰ֬ೝͨ͠ʮ12345ʯͰ ͨ͠ɻʣ var orangePtr = UnsafeMutablePointer<Int>.allocate(capacity:1) // + or - orangePtr and make it to 0x00000001c0013570 let orangeValue = orangePtr.pointee
SIRIKIT AND ME EXTENSION - MEMORY ▸ ଞͷϓϩηεͰ֬อͨ͠ϝϞϦʹ͍ͭͯɺͨͱ͑ͦͷΞυϨε͕Θ͔͍ͬͯͯ Λࢀর͢Δ͜ͱͰ͖·ͤΜɻ ▸
App ExtentionHost Appͱҧ͏ϓϩηεͷͨΊɺϝϞϦʔ্ͷใΛڞ༗Ͱ͖ ·ͤΜɻ ▸ ExtensionͷҰछͰ͋ΔIntentsɺಉ༷ʹ HostApp ͱϝϞϦʔঢ়ͷใΛڞ༗͢ Δ͜ͱͰ͖·ͤΜɻ
SIRIKIT AND ME EXTENSION - MEMORY ▸ ϝϞϦʔ্ͷใڞ༗͕Ͱ͖ͳ͍߹ɺͲ͏ͬͯHost AppͱใΛڞ༗͢Δ ͔ɻ
▸ →ϑΝΠϧΩϟογϡΛ͍·͢ɻ
SIRIKIT AND ME EXTENSION - FILE STORAGE ▸ iOSͰɺϑΝΠϧγεςϜ্ʹ Sandboxͱ͍͏Έ͕͋ΓɺҰͭͷΞϓϦͷ
File StorageଞͷΞϓϦ͔ΒݟΔ͜ͱ͕Ͱ͖·ͤΜɻ ▸ ࣮ɺExtensionଞͷΞϓϦͱಉ͡ѻ͍ͱͳΓɺHost AppͷFile StorageͱApp ExtensionͷFile Storageҧ͏ॴͱͳΓɺޓ͍ʹΞΫηε͢Δ͜ͱͰ͖·ͤ Μɻ
SIRIKIT AND ME EXTENSION - FILE STORAGE ▸ ͦ͜Ͱɺڞ௨ʹ͑ΔFile Storageͱͯ͠ɺApp
GroupΛར༻͠·͢ɻ ▸ App Groupɺಉ͡DeveloperͷΞϓϦͲ͏͠Ͱಉ͡File StorageΛڞ༗͢Δ ΈͰ͢ɻ ▸ App GroupͰΞϓϦؒσʔλڞ༗ ▸ http://www.toyship.org/archives/1845
SIRIKIT AND ME TIMEOUT ERROR ▸ SiriϢʔβʔʹࣗવʹԠ͠ͳ͍͚ͯ͘ͳ͍ͨ ΊɺSiriKitͷॲཧʹλΠϜΞτ੍ݶ͕͋Γ· ͢ɻ ▸
ϩδοΫॲཧɺϏδωεॲཧʹ࣌ؒΛ͔͚Δ͜ͱ ͕Ͱ͖·ͤΜɻ ▸ ͕͔͔࣌ؒΔωοτϫʔΫॲཧͳͲɺϑΝΠϧ ΩϟογϡͳͲΛͬͯϨεϙϯε࣌ؒΛ͘͢ Δ͜ͱ༗ޮɻ
SIRIKIT AND ME INTERNAL SERVER ERROR ▸ SiriKitͷIntentsϑϨʔϜϫʔΫͷΤϥʔใऔಘ͕ ͍͠ ▸
໌֬ͳΤϥʔʢΤϥʔίʔυͳͲʣ͕ؼͬͯ͜ ͳ͍͜ͱ͕ଟ͍ɻʮ୯ʹࣦഊͨ͠ʯͱͳͬͯ͠ ·͏ͨΊɺσʔλͷϑΥʔϚοτΤϥʔͳͷ͔ɺ ϓϩύςΟʔͷΤϥʔͳͷ͔Θ͔Γ·ͤΜɻ ▸ SiriKitͷϑϨʔϜϫʔΫͷग़͢ϩάΛݟΕ໌ ͢ΔͷͰɺͦΕΛ֬ೝͨ͠΄͏͕͍͍Ͱ͠ΐ͏ɻ
SIRIKIT AND ME CHANGE ON VERSIONUP ▸ iOSͷόʔδϣϯΞοϓͰϨεϙϯε͕ҟͳΔ͜ͱ͕͋Γ· ͢ɻ ▸
iOSͷϚΠφʔόʔδϣϯΞοϓͰϓϩύςΟ͕͠Εͬͱ ૿ݮ͍ͯͨ͠ΓɺγεςϜ͕දࣔ͢ΔUI͕ҧͬͨΓ……ɻ ▸ ࣗͷίʔυશ͘ม͑ͯͳ͍ͷʹಈ࡞͕มΘͬͯ͠·͏͜ ͱ͋Γɺ৺ͷ҆ఆΛอͯͳ͍͜ͱ͋Γ·͢ɻ ▸ ՄೳͰ͋ΕɺγεςϜ͔ΒͷϨεϙϯεͷө૾ؚΊͨه Λ͓ͯ͘͠ͱɺଟগ҆৺࣮͕ͯ͢͢͠ΊΒΕ·͢ɻ
SIRIKIT AND ME BUGS ON LANGUAGES ▸ AppleͰSiriKitؔ࿈ͷػೳͷݕূӳޠΛத৺ʹߦΘΕ͍ͯ·͢ɻ ▸ ຊޠͳͲɺӳޠҎ֎ͷݴޠͰಈ࡞ͤ͞Δͱɺҙਤͨ͠ಈ࡞ʹͳΒͳ͍͜ͱ͋
Γ·͢ɻ ▸ ྫ͑ɺࣸਅݕࡧͷIntentsͰɺຊޠͷ߹ʹจࣈྻ͕దʹ͞Εͳ͍ό άͳͲ͕͋Γ·͢ɻ ▸ SiriKit࣮࣌ʹӳޠڥͰ֬ೝ͢Δ͜ͱඞཁɻ
SIRIKIT AND ME HOW I STRUGGLE WITH SIRIKIT ▸ ࠓͷࢿྉͰޠΓ͖Εͳ͔ͬͨSiriKitͷ࣮ͷ
TipsͳͲΛͪ͜ΒͰઆ໌͍ͯ͠·͢ɻ ▸ How I struggle with SiriKit. ▸ https://speakerdeck.com/toyship/how-i- struggle-with-sirikit
SIRIKIT AND ME ·ͱΊ ▸ SiriKit࣮ྔগͳ͍Ͱ͕͢ɺσόοά࣌ʹ Γӽ͑ͳ͍͚ͯ͘ͳ͍น͕ඇৗʹߴ͘ɺ 10ͷiOSܦݧͰҰ൪ͭΒ͍࣮Ͱͨ͠ɻ ▸ ͰHomePodରԠͳͲɺ৽͍͜͠Ε͔Βͷํ
ੑΛͻΒ͘ͷͳͷͰɺͥͻͬͯΈͯͩ͘ ͍͞ɻ
TEXT ▸ ϥϯνͷ͓ళ༧ͯ͠ ▸ ΠλϦΞϯͰ ▸ ໌ͷ͔̍̎࣌̏̌Β ▸ ਓೋਓ ▸
ʮ͍ɻˎˎͰ12:30͔Β໊̎Ͱ༧Ͱ͖·ͨ͠ɻʯ
TEXT ▸ ϥϯνͷ༧ͯ͠ ▸ ໌ͷ͓னʹ༧ఆ͕ೖ͍ͬͯΔ͔Β͜Εͩͳ……ɻ ▸ ༧ఆ12:30͔Β͔ͩΒͦͷ࣌ؒʹ༧͠Α͏ ▸ ˎ͞Μͷ໊લ͕ೖͬͯΔ͔Β໊̎Ͱ͍͍ͳɻ ▸
ˎ͞Μͱͷϥϯνલճ͜ͷళ͔ͩͬͨΒ͜͜ʹ͠Α͏ ▸ ʮ͍ɻˎˎͰ12:30͔Β໊̎Ͱ༧Ͱ͖·ͨ͠ɻʯ
TEXT ▸ طଘͷϏδωεϩδοΫ͋Θ࣮ͤͯΛ͢Δ ▸ ϏδωεϩδοΫʹ͋ΘͤͯϢʔβʔʹೖྗͤ͞Δ ▸ ͷͰͳ͘ɻ ▸ ϢʔβʔͷཧͷUXʹϏδωεϩδοΫͱ࣮Λ͋Θ͍ͤͯ͘ྗΛ͢Δɻ