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
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
590
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
7
810
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
520
フルカイテン株式会社 採用資料
fullkaiten
0
40k
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
190
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
300
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Making Projects Easy
brettharned
115
5.9k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Statistics for Hackers
jakevdp
796
220k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
What's new in Ruby 2.0
geeforr
343
31k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Thoughts on Productivity
jonyablonski
67
4.3k
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ʹϏδωεϩδοΫͱ࣮Λ͋Θ͍ͤͯ͘ྗΛ͢Δɻ