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
Mac1台でアプリを作る時代再び
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
taminif
November 09, 2017
Programming
480
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
310
「とりあえずAI」が招く悲劇〜私がAIで生産性を下げるまでの話〜 / The tragedy caused by "AI for now" - The story of how I used AI to reduce my productivity
taminif
1
350
PuppeteerとPlaywrightの15日間の演劇 / relation of Puppeteer and Playwright
taminif
3
2.3k
Redashの開発はじめました / How to get started Redash development
taminif
0
820
私の生活を変えたHeadless Chrome / Headless Chrome who changed my life
taminif
3
560
WebSocketをiOSに持ち込んで辛い思いをした経験がありますか!? / have you painful experience in web socket?
taminif
3
6.3k
LINEで馬券を購入する / Purchase a betting ticket at LINE
taminif
1
1.7k
SkyWayで一年間運用してきたけどWebRTCってつらいんじゃないの
taminif
2
1k
オンライン英会話とSkyWay
taminif
0
560
Other Decks in Programming
See All in Programming
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
590
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
240
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
200
Jetpack Compose Mechanisms
skydoves
3
870
AI-Powered Domain-Driven Design
ziobrando
0
320
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
430
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
820
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
1.1k
phperだってパンチカードでコーディングしたい
o0h
PRO
0
460
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
7k
APNsからLive Activityを開始する話
yumnumm
0
180
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
120
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
4
5.5M
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
290
How to build a perfect <img>
jonoalderson
1
6.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Designing for Timeless Needs
cassininazir
1
530
Unsuck your backbone
ammeep
672
58k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
How to train your dragon (web standard)
notwaldorf
96
6.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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։࠵ͯ͠Δ͔ΒདྷͯͶʂ
ྑ͍αʔϏεͰɺྑ͍ਓੜΛ
͋Γ͕ͱ͏͍͟͝·ͨ͠