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
280
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.2k
HEVC Video with Alpha Channel
toyship
1
1.1k
RealityKit & Reality Composer
toyship
3
480
ARKit3
toyship
4
7k
UIViewPropertyAnimator and Easing
toyship
2
930
Other Decks in Technology
See All in Technology
10分でわかるfreee エンジニア向け会社説明資料
freee
18
520k
10分でわかるfreeeのQA
freee
1
3.4k
AWS CDKでデータリストアの運用、どのように設計する?~Aurora・EFSの実践事例を紹介~/aws-cdk-data-restore-aurora-efs
mhrtech
4
640
分布で見る効果検証入門 / ai-distributional-effect
cyberagentdevelopers
PRO
4
690
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
24
6.7k
生成AIの強みと弱みを理解して、生成AIがもたらすパワーをプロダクトの価値へ繋げるために実践したこと / advance-ai-generating
cyberagentdevelopers
PRO
1
180
話題のGraphRAG、その可能性と課題を理解する
hide212131
4
1.4k
[AWS JAPAN 生成AIハッカソン] Dialog の紹介
yoshimi0227
0
150
プロダクトエンジニアが活躍する環境を作りたくて 事業責任者になった話 ~プロダクトエンジニアの行き着く先~
gimupop
1
460
Vueで Webコンポーネントを作って Reactで使う / 20241030-cloudsign-vuefes_after_night
bengo4com
4
2.5k
30万人が利用するチャットをFirebase Realtime DatabaseからActionCableへ移行する方法
ryosk7
5
330
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
170
Featured
See All Featured
Facilitating Awesome Meetings
lara
49
6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
150
Raft: Consensus for Rubyists
vanstee
136
6.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Happy Clients
brianwarren
97
6.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
The Cult of Friendly URLs
andyhume
78
6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Music & Morning Musume
bryan
46
6.1k
Rails Girls Zürich Keynote
gr2m
93
13k
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ʹϏδωεϩδοΫͱ࣮Λ͋Θ͍ͤͯ͘ྗΛ͢Δɻ