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
510
ARKit3
toyship
4
7.1k
UIViewPropertyAnimator and Easing
toyship
2
960
Other Decks in Technology
See All in Technology
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
530
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
260
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
生成AIのガバナンスの全体像と現実解
fnifni
1
190
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
480
UI State設計とテスト方針
rmakiyama
2
550
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
32k
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
190
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
170
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
220
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
740
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
97
Making the Leap to Tech Lead
cromwellryan
133
9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Pragmatic Product Professional
lauravandoore
32
6.3k
4 Signs Your Business is Dying
shpigford
181
21k
How STYLIGHT went responsive
nonsquared
95
5.2k
GitHub's CSS Performance
jonrohan
1030
460k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
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ʹϏδωεϩδοΫͱ࣮Λ͋Θ͍ͤͯ͘ྗΛ͢Δɻ