Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
パラレルの通話を支える iOS アプリ上での技術
Search
Naoki ISHIKAWA
July 30, 2021
Technology
2.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
パラレルの通話を支える iOS アプリ上での技術
https://radiotalk.connpass.com/event/219952/
Naoki ISHIKAWA
July 30, 2021
Transcript
23 slides
Naoki ISHIKAWA @jarinosuke 2021/7/29 iOS Tech talk ύϥϨϧͷ௨Λࢧ͑Δ iOS ΞϓϦ্Ͱͷٕज़
1
ࣗݾհ 2
ࣗݾհ • 2010ʹϠϑʔʢYahoo! JAPANʣʹΤϯδχΞͱͯ͠ೖࣾɻͦͷޙΠάχε ʹͯेݸͷΞϓϦ։ൃܦݧΛܦͯɺ2016ʹϝϧΧϦస৬ɻϝϧϖΠ։ ൃɺΤϯδχΞϦϯάϚωʔδϟʔΛܦͯ202011݄ʹύϥϨϧʹೖࣾɻ • https://www.wantedly.com/companies/parallel/post_articles/333769 3
ΞδΣϯμ • ✅ࣗݾհ • ύϥϨϧͷઆ໌ • ύϥϨϧͷΞϓϦ্Ͱ࣮ݱ͍ͨ͜͠ͱ • ͍ͬͯΔ֤ٕज़ͷৄࡉ 4
ύϥϨϧͷઆ໌ 5
Copyright © Parallel Inc. All Rights Reserved. ༑ୡͱ༡Δ௨ΞϓϦʮύϥϨϧʯ 6 App
Store ධՁɿ4.7/5.0ʢ 2.3ສ݅ʣ ύϥϨϧͷྑ͍༑ୡͱ௨Λܨ͗ͳ͕ΒɺήʔϜͨ͠ΓಈըΛݟͨΓͯ͠༡Δ௨ΞϓϦͰ͢ ᶃ ๛ͳ௨ػձͷग़ • ༑ୡͷεςʔλεදࣔ • ؆୯ελϯϓΞΫγϣϯ • ௨։࢝࣌ͷϓογϡ௨ ᶄ ࠷దͳ௨ڥ • ݸผʹ௨ԻྔΛௐՄೳ • ѹతʹԆͳ௨৴ ᶅ εϚϗ࠷దԽ͞ΕͨUI/U X • ొ10ඵͰྃ • ͍׳ΕͨUI/UXͰ͙͢ʹ͑Δ ᶆ Ұॹʹ༡ΔύʔςΟʔίϯςϯπ • αΫοͱ༑ୡͱ༡Δίϯςϯπ͕๛ • ϘλϯҰͭͰڞಉମݧ͕Մೳ
ύϥϨϧͷΞϓϦ্Ͱ࣮ݱ͍ͨ͜͠ͱ 7
ύϥϨϧͷΞϓϦ্Ͱ࣮ݱ͍ͨ͜͠ͱ • ߴ࣭ͳԻ • ϦΞϧλΠϜͳϝοηʔδϯά • ༷ʑͳϑΥʔϚοτͷίϯςϯπͷಋೖ 8
ύϥϨϧͷΞϓϦ্Ͱ࣮ݱ͍ͨ͜͠ͱ • ߴ࣭ͳԻ • ϦΞϧλΠϜͳϝοηʔδϯά • ༷ʑͳϑΥʔϚοτͷίϯςϯπͷಋೖ 9
ϦΞϧλΠϜͳϝοηʔδϯά • HTTPS + Push ௨Ҏ্ʹ ϦΞϧλΠϜੑΛߴΊ͍ͨ • ϢʔβʔͷΦϯϥΠϯͷදࣔɺνϟοτૹ৴ɺϧʔϜͷঢ়ଶมԽ •
WebSocket • Starscream 10
WebSocket ֓ཁ • ௨࣌ • background ਐೖ࣌ଓΛܧଓ • background mode:
audio Λࢦఆ͍ͯ͠ΔͷͰɺ௨த background Ͱ main thread ͷϥϯϧʔϓܧଓ͢ΔͨΊ • ඇ௨࣌ • background ਐೖ࣌ʹஅɺforeground ʹͬͨ࣌ʹଓ 11
WebSocket ֓ཁ • ௨࣌ • background ਐೖ࣌ଓΛܧଓ • background mode:
audio Λࢦఆ͍ͯ͠ΔͷͰɺ௨த background Ͱ main thread ͷϥϯϧʔϓܧଓ͢ΔͨΊ • ඇ௨࣌ • background ਐೖ࣌ʹஅɺforeground ʹͬͨ࣌ʹଓ 12
WebSocket background Ͱ௨தʹΕͯ͠·͏ݪҼͱରॲํ๏ • ݪҼ • background ௨தʹ௨৴͕ Cellular <->
WiFi Ͱมߋ͞Εͨͱ͖ • ରॲ • heartbeat(ping/pong) ͷಋೖ • ఆظతʹ Timer Λͬͯૄ௨֬ೝ 13
ύϥϨϧͷΞϓϦ্Ͱ࣮ݱ͍ͨ͜͠ͱ • ߴ࣭ͳԻ • ✅ϦΞϧλΠϜͳϝοηʔδϯά • ༷ʑͳϑΥʔϚοτͷίϯςϯπͷಋೖ 14
༷ʑͳϑΥʔϚοτͷίϯςϯπͷಋೖ • iOS Native • WebView • Unity as a
Library • Broadcast Extension 15
༷ʑͳϑΥʔϚοτͷίϯςϯπͷಋೖ • iOS Native • WebView • Unity as a
Library • Broadcast Extension 16
Unity as a Library • ʲUnityʳMirrativͷEmbedding UnityΛߋ৽ͨ͠: ࣮ફ Unity as
a Library • ͪ͜ΒΛࢀߟʹΞϓϦʹ݁߹ • Ռ UnityFramework.framework Λ repos ʹ push ͢Δ • ͦͷ repos Λ submodule ͰऔΓࠐΉ ڥߏங 17
Unity as a Library • Unity UIWindow Λ͏Ұͭ࡞͍ͯ͠Δ •
Unity ͱ app ͷ window Λަޓʹ makeKeyAndVisible ͠ͳ͕Βը໘ભҠ • Unity ͷ view ্ʹɺUIViewController ΛΦʔόʔϨΠ͍ͤͯ͞Δ • Unity -> Native ͷϝοηʔδϯά • Unity ͷதʹ NativeCallsProxy protocol Λఆٛ • ͦΕʹద߹ͨ͠ object ΛΞϓϦଆͰ `FrameworkLibAPI.registerAPIforNativeCalls` ݺ ͼग़͠ొ ࣮ 18
Unity as a Library • େมͳͱ͜Ζ • όΠφϦαΠζ͕େ͖͘ͳΔ • Unity
ݻ༗ͷΫϥογϡ͕ൃੜ͢Δ • Ϋϥογϡϩάͷղੳ͕͍͠ ࣮ 19
Broadcast Extension • ը໘ڞ༗ʹ༻͍Δ • ReplayKit (2) Λ༻ • 2
͔ΒγεςϜඪ४ͷUIΛͬͯɺʹөΔը໘Λ৴Ͱ͖ΔΑ͏ʹ • Կ͔ͱෆ҆ఆ • Invalid broadcast session Ͱݕࡧ͢Δͱɺը໘ڞ༗Λαϙʔτ͍ͯ͠Δ ΞϓϦ͕Θ͔Δ ֓ཁ 20
Broadcast Extension • App <-> Broadcast Extension ؒͷΠϕϯτ௨͕͍͠ • ࣮ࡍͷը໘ڞ༗ͷ։࢝ͱऴྃΛΞϓϦଆͰΓ͍ͨ
• capturedDidChangeNoti fi cation UIScreen.isCaptured ͋Δ • ͜Εͩͱը໘ڞ༗͚ͩͰͳ͘ɺը AirPlay ରʹͳͬͯ͠·͏ • App Group ܦ༝ͰϑϥάΛड͚͍ͯ͠Δ(!!!) ࣮ 21
ΞδΣϯμ • ✅ࣗݾհ • ✅ύϥϨϧͷઆ໌ • ✅ύϥϨϧͷΞϓϦ্Ͱ࣮ݱ͍ͨ͜͠ͱ • ✅͍ͬͯΔ֤ٕज़ͷৄࡉ 22
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ 23
More Decks by Naoki ISHIKAWA
See All by Naoki ISHIKAWA
メルペイのエンジニアリング組織の変化と目指すチーム像
jarinosuke
5
6.9k
RIBs
jarinosuke
2
1.9k
US 版 Mercari をまるごと1から作り直した話
jarinosuke
2
4.5k
メルカリiOSアプリ開発の現状とこれから / Mercari Day 2017
jarinosuke
3
6.9k
Drink Meetup with Mercari #36
jarinosuke
0
1.2k
Switching Icon.png depending on each environment
jarinosuke
2
11k
Other Decks in Technology
See All in Technology
顧客合意を取りながら進めるAWSコスト削減の実践
optim
0
170
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
1
160
「任されビリティ」で引き受けて「よしなりてぃ」に頼らず任せる / Accept tasks with "makasarebility" and hand them over without relying on "yoshinarily"
pauli
0
540
SREのためのFinOps入門
muziyoshiz
3
1.5k
複数システムが同居した 15 年物の AWS アカウントを解体するための考古学
wa6sn
3
150
The Author Pays
hiccupps
0
210
常時稼働エージェントの作り方(Claude公式ブログを資料化)
minorun365
PRO
1
1.4k
Where Should Platform Complexity Live? Lessons from a Cross-Team PR Preview Platform
taiki45
0
110
[JAWS Festa 2026]一番いい仕事は、請求書に現れない / jawsfesta2026
sh_fk2
2
520
Intro to Kiro (One agent, every surface) | Kiro: Zero to Hero 01
inariku
PRO
2
130
Kiro Web 入門 (サインインから、頼み方、PR の受け取り、クラウドの決まりまで) | 目指せ Kiro マスター 04
inariku
PRO
2
120
AI時代における医療情報システムのセキュリティ / Security of Healthcare IT Systems in the AI Era
henryofficial
0
170
Featured
See All Featured
Practical Orchestrator
shlominoach
192
12k
How to Talk to Developers About Accessibility
jct
2
620
Visualization
eitanlees
153
17k
Believing is Seeing
oripsolob
1
280
RailsConf 2023
tenderlove
30
1.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Discover your Explorer Soul
emna__ayadi
2
1.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
1
300
Everyday Curiosity
cassininazir
0
400