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
Mac1台でアプリを作る時代再び
Search
taminif
November 09, 2017
Programming
450
0
Share
Mac1台でアプリを作る時代再び
Osaka Mix Leap Study #1 - Android / iOSで発表した資料です。
taminif
November 09, 2017
More Decks by taminif
See All by taminif
React Native New Architecture 移行実践報告
taminif
1
230
「とりあえずAI」が招く悲劇〜私がAIで生産性を下げるまでの話〜 / The tragedy caused by "AI for now" - The story of how I used AI to reduce my productivity
taminif
1
300
PuppeteerとPlaywrightの15日間の演劇 / relation of Puppeteer and Playwright
taminif
3
2.3k
Redashの開発はじめました / How to get started Redash development
taminif
0
800
私の生活を変えたHeadless Chrome / Headless Chrome who changed my life
taminif
3
540
WebSocketをiOSに持ち込んで辛い思いをした経験がありますか!? / have you painful experience in web socket?
taminif
3
6.2k
LINEで馬券を購入する / Purchase a betting ticket at LINE
taminif
1
1.7k
SkyWayで一年間運用してきたけどWebRTCってつらいんじゃないの
taminif
2
1k
オンライン英会話とSkyWay
taminif
0
540
Other Decks in Programming
See All in Programming
🦞OpenClaw works with AWS
licux
1
350
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
680
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
380
The Less-Told Story of Socket Timeouts
coe401_
3
1.1k
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
Explore CoroutineScope
tomoeng11
0
180
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
330
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
680
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
430
Back to the roots of date
jinroq
0
780
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
How to make the Groovebox
asonas
2
2.2k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.9k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Rails Girls Zürich Keynote
gr2m
96
14k
Agile that works and the tools we love
rasmusluckow
331
21k
It's Worth the Effort
3n
188
29k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
340
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Bash Introduction
62gerente
615
210k
Transcript
Mac1Ͱ ΞϓϦΛ࡞Δ࣌࠶ͼ Osaka Mix Leap Study #1 - Android /
iOS 2017/11/09 େౡ ޫو@sbntaminif
ࣗݾհ • ΣϒϦΦגࣜձࣾWEBΤϯδχΞ + ϓϩμΫτ Ϛωʔδϟʔ • ฏWEBΞϓϦɺٳiOSΞϓϦΛͬͯ·͢ • WebRTC
Meetup Osakaओ࠵ • ීஈژͰಇ͍͍ͯ·͢
http://ejje.weblio.jp/content/ios
iOSDC 2017Ͱొஃ͖ͯ͠·ͨ͠ ຊ༰ͪΐͬͱඃͬͯ·͢ https://speakerdeck.com/taminif/ ying-hui-hua-sabisufalsetamenikai- fa-sitabideotiyatutoapurifalseji-shu
λΠτϧʹʮ࣌ʯͱ͋ΔͷͰ ·ͣྺ࢙
ΞϓϦ։ൃͷྺ࢙ ʢݸਓͷओ؍Ͱ͢ʣ • γϯϓϧͳҰػೳΞϓϦ • ίϯγϡʔϚʔҠ২ͷΑ͏ͳങ͍ΓܕΞϓϦ • αʔόʔͱͷ࿈ܞΛඞཁͱ͍ͯ͠ΔΞϓϦ ϝϞి γϯϓϧͳήʔϜ
ιγϟή ϘʔυήʔϜͷରઓܕ Ϋϥυܥ
ࠓͱʹ͔͘αʔόʔͱͷ ࿈ܞ͕ඞཁ ͦͷͨΊʹαʔόʔΛ ༻ҙ͢Δඞཁ͕͋Δ
αʔόʔ͕͍Δʂ
αʔόʔΛ༻ҙ͢Δͷ ΞϓϦ։ൃऀʹͱَͬͯ
ͦ͜ͰɺαʔόʔϨε
ͦ͜ͰɺFirebase • FirebaseGoogle͕ఏڙ͢ΔmBaaS • iOS, Android, ΣϒͰ༻Մೳ • ։ൃΛॿ͚Δଟ͘ͷػೳ͕͋Γ·͢ɻ
ͦ͜ͰɺFirebase • ࣗͰαʔόʔΛ༻ҙ͢ΔΑΓ҆Ձ • Ұఆͷ௨৴·ͰແྉͰ͑Δ • Google͕ӡӦ͢Δ͚ͩ͋ͬͯ΄ͱΜͲམ ͪͳ͍ • ೖΕΔ͚ͩͰଟ͘ͷػೳΛΧόʔ͢Δ
ଟ͘ͷΞϓϦ։ൃऀ͕ ͍ͯ͠Δʂʂ
FirebaseΛΞϓϦʹ ΈࠐΜͰΈΑ͏
͜͜ͰɺνϟοτΞϓϦ Λྫʹߟ͑ͯΈ·͢
ͦͷલʹɾɾɾ FirebaseΛΞϓϦʹΈࠐ Ή͜ͱͰԿ͕࣮ݱͰ͖Δ͔
͜͏ͳΔ • Կ͠ͳͯ͘Analytics͕Έࠐ·ΕΔ • CrashϩάΛݟΔ͜ͱ͕Ͱ͖Δ • ϓογϡ௨ΛૹΔ͜ͱ͕Ͱ͖Δ • NEW! A/BςετΛߦ͏͜ͱ͕Ͱ͖Δ
શͯΛΓ͍ͨํ ԼهURL https://firebase.google.com/products/?hl=ja
νϟοτΞϓϦʹ Realtime Database • ΫϥυͰϗεςΟϯά͞ΕΔDB • JSONͰอଘ͞ΕɺπϦʔߏͰߏங • શͯͷΫϥΠΞϯτͰಉظ͞ΕΔ •
ΦϑϥΠϯ/ΦϯϥΠϯͷΓସ͑ରԠ
Realtime DatabaseΛͬ ͯνϟοτΛ࣮
Realtime DatabaseͷΈ 'JSFCBTFαʔό ᶄ3FBMUJNF%BUBCBTFʹ ॻ͖ࠐΈ ᶅॻ͖ࠐ·Εͨ༰Λ ௨ ᶃࢦఆͨ͠ύεΛ ࢹ͢ΔΑ͏ઃఆ
νϟοτͷ࣮ݱ ,FZ7BMVFͰΛอଘ औಘ͢Δࡍ+40/ܗ ࣜͰऔಘͰ͖Δ ҰͭͷϊʔυͰҰͭͷνϟοτΛ ࣮ݱ͍ͯ͠Δ ࣌ܥྻॱʹฒΔ͜ͱͰνϟοτͬΆ͘ දࣔ
Realtime Database let withBlock = { (snapshot: FIRDataSnapshot) in //
received chat data if let dictionary = snapshot.value as? [String : AnyObject] { guard let isRoleProf = dictionary["is_role_prof"] as? Bool, let timeMsec = dictionary["time_msec"] as? UInt64, let senderIdString = dictionary["sender_id"] as? String, let senderId = Int(senderIdString), let text = dictionary["text"] as? String else { return } let time:Double = Double(timeMsec) / 1000 } var data:ChatDataStruct if isRoleProf { // prof data = ChatDataStruct(messageSender: .YOU, message: text, displayTime: self.displayTimeFormatter.string(from: Date(timeIntervalSince1970: time))) } else { // member data = ChatDataStruct(messageSender: .ME, message: text, displayTime: self.displayTimeFormatter.string(from: Date(timeIntervalSince1970: time))) } self.chatTableReload(data: data) } firebaseChatObserveHandle = firebaseUserReference.child(`Firebaseͷύε `).observe(.childAdded, with: withBlock) ՃࣜͰ0CTFSWFS ηοτ 'JSFCBTF͔Βϊʔ υΛड͚औͬͨ࣌ ͷॲཧΛఆٛ
ͪΐͬͱઢ
νϟοτػೳWebRTCΛ ࣮ͬͯݱͰ͖·͢ WebRTCͱɾɾɾ • W3C͕ఏএ͢ΔP2PϦΞϧλΠϜίϛϡχέʔ γϣϯΛ࣮ݱ͢Δٕज़ • ϓϥάΠϯͳ͠ͰϒϥβؒͷΓͱΓ͕Մೳ • ςΩετόΠφϦͳͲͷσʔλܗࣜө૾
ԻͳͲͷStreamܗࣜͷΓͱΓ͕Մೳ
WebRTCͷΈ ᶅ௨৴ʂ 456/563/ ʢதܧʣαʔό γάφϦϯά αʔό ᶃ ᶄ ᶄ ᶃ
ͪ͜ΒɺαʔυύʔςΟ͕ ͋ΔͷͰແྉͰ࣮Ͱ͖·͢
͡Ό͋ɺͲͬͪΛ͑ ྑ͍ͷʁ
3ͭͷ؍Ͱબ͢Δͷ͕ྑ͍ • MVP • νϟοτҎ֎ͷՃՁ • ͍ͣΕαʔϏε֦େͨ͠߹ͷ ίετύϑΥʔϚϯε
MVP • Minimum Viable Product • ϦʔϯελʔτΞοϓΛ࣮ߦ͢Δͨ Ίͷखஈ • ελʔτΞοϓʹ͔ܽͤͳ͍ߟ͑ํ
• ࣗʹͱͬͯ࠷খݶͷίετͰʂ
νϟοτҎ֎ͷՃՁ • Firebaseઆ໌ͨ͠௨Γ • WebRTCͩͱϏσΦνϟοτ࣮ Ͱ͖Δ • ଞʹ͚͍ͭͨػೳͰߟ͑Δʂ
αʔϏε֦େ࣌ • ͲͪΒ༻ྔ͕૿͑Δͱ͓͕͔ۚ ͔Δ • ༻ਓμϯϩʔυྔͳͲ • Ͳ͜·Ͱ͓͕͔͔͑ۚΔ͔Λܭ ࢉ͠Α͏ʂ
·ͱΊ
·ͱΊ • Firebaseྑ͍Αʂ • ͱʹ͔͘Կ͔࡞Ζ͏ʂ • WebRTCྑ͍Αʂ • େࡕͰMeetup։࠵ͯ͠Δ͔ΒདྷͯͶʂ
ྑ͍αʔϏεͰɺྑ͍ਓੜΛ
͋Γ͕ͱ͏͍͟͝·ͨ͠