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
Engineer Career Talk
lycorp_recruit_jp
0
190
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
100
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
480
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
複雑なState管理からの脱却
sansantech
PRO
1
150
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Being A Developer After 40
akosma
87
590k
Music & Morning Musume
bryan
46
6.2k
Automating Front-end Workflow
addyosmani
1366
200k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
BBQ
matthewcrist
85
9.3k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Practical Orchestrator
shlominoach
186
10k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Designing Experiences People Love
moore
138
23k
What's new in Ruby 2.0
geeforr
343
31k
Side Projects
sachag
452
42k
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ʹϏδωεϩδοΫͱ࣮Λ͋Θ͍ͤͯ͘ྗΛ͢Δɻ