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
Nature での React Native アプリの運用について / React Nativ...
Search
soh335
September 03, 2020
Programming
1.6k
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nature での React Native アプリの運用について / React Native App in Nature
soh335
September 03, 2020
More Decks by soh335
See All by soh335
React Native in Nature
soh335
1
1.5k
Carton を既存の環境に入れるまで入れてから
soh335
0
240
perl な web application のためのテスト情報
soh335
5
3.8k
Other Decks in Programming
See All in Programming
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.3k
Google Apps Script で Ruby を動かす
kawahara
0
130
yield再入門 #phpcon
o0h
PRO
0
970
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
460
5分で問診!Composer セキュリティ健康診断
codmoninc
0
890
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
200
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
440
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
240
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
580
VibeCodingからAgenticWorkflowへ
starfish719
0
300
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.4k
Android CLI
fornewid
0
210
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
520
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.2k
Building Applications with DynamoDB
mza
96
7.2k
Design in an AI World
tapps
1
270
Building AI with AI
inesmontani
PRO
1
1.1k
Embracing the Ebb and Flow
colly
88
5.1k
The Invisible Side of Design
smashingmag
301
52k
Raft: Consensus for Rubyists
vanstee
141
7.6k
KATA
mclloyd
PRO
35
15k
Odyssey Design
rkendrick25
PRO
2
750
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
56k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Transcript
厳秘:本資料の⼀部または全部を、Nature株式会社の許可なしに、複製、転載することを禁じます。 Nature Ͱͷ React Native ΞϓϦͷӡ༻ʹ͍ͭͯ Sep 4. 2020 Nature
Inc. soh335
• github.com/soh335 • Nature גࣜձࣾιϑτΣΞΤϯδχΞ About Me 2
• Nature Remo, νʔϜͷհ • Ҡߦ࣌ͷ • ࠷ۙͷ։ൃͷ • ࠷ۙߟ͑ͯΔ͜ͱ
Agenda 3
Nature Remo, チームの紹介
5
スマートデバイス Nature Remo 家電 How It Works
• ΞϓϦ: 2 • όοΫΤϯυ: 3 • ϑΝʔϜΣΞ: 2 •
߹ܭ 5 ਓ ιϑτΣΞΤϯδχΞνʔϜ 7
• https://employment.en-japan.com/ engineerhub/entry/2020/02/06/103000 • ࢀߟʹͳΔͱࢥ͍·͢ React Native ࣗମʹؔͯ͠ 8
Ҡߦ࣌ͷ
Ҡߦཧ༝ • ೋਓͰ iOS, Android ΛΞΫςΟϒʹ։ൃ͍ͯ͘͠ͷ͕͔ͬͨ͠ • ࣌ • React
Native 0.52.0 • TypeScript 2.6.2 • https://employment.en-japan.com/engineerhub/entry/ 2018/08/17/110000 • 2લʹΠϯλϏϡʔͯ͠Β͍·ͨ͠ 10
͜ͷλΠϛϯάͰσβΠϯ৽ • ೝূ෦ϚΠάϨʔγϣϯॲཧΛ༻ҙ • σβΠϯͷ੍͋Δ • iOS ʹ͋Δจࣈͷେ͖͞Λௐͯ͠٧ΊΔͭͱ͔ Android ʹͳ͔ͬ
ͨΓɺٯ͋ΔͷͰ • View पΓ΄΅ίʔυڞ௨Խ͞ΕͯΔ • ΞΫςΟϒʹϦϦʔεͰ͖ΔΑ͏ʹͳͬͨ 11
ڞ௨ԽͰ͖ͳ͔ͬͨͷ • ωΠςΟϒͷڍಈʹؔ࿈͢Δͷ • ύʔϛογϣϯपΓ • Geofence पΓ • ϝʔϥ։͘ͱ͜Ζͱ͔
• ࣌ͳ͔͕ͬͨ Bluetooth पΓ • Ͳ͔ͪΒ͚ͩڍಈ͕͓͔͘͠ճආࡦΛೖΕͯΔ߹ 12
ࠔͬͨϙΠϯτ • σόΠεͷηοτΞοϓ࣌ʹσόΠεࣗͷωοτϫʔΫʹεϚʔτϑΥ ϯ͕ܨ͙ඞཁ͕͋Δ • Ϛγϯʹىಈ͍ͯ͠ΔσόοΨͱͷଓ͕ΕΔ… • Today widget •
https://reactnative.dev/docs/app-extensions 13
࣌ݟक͍ͬͯͨIssue • ςΩετपΓ͕ଟ͍ҹ • CJKಛ༗ͳͷ • ωΠςΟϒଆͷϏϧυγεςϜ͕৽͞ΕΔͱେม
࠷ۙͷ։ൃͷ
• Visual Studio Code • Xcode • Android Studio •
Emulator ։ൃڥ 16
• React Navigation Λ͍ͬͯΔͷͰ Screen Component ༻ҙͯ͠ • ࠷ۙ hooks
ͬͯॻ͍ͯΔ • ෳࡶͳσβΠϯʹͨ͘͠ͳ͍ͷͰγϯϓϧʹ ৽͍͠ը໘ 17
࠷ۙՃͨ͠ը໘ • άϥϑपΓͷܭࢉ D3 • ඳը react-native-svg
React Native ͷ Version Λ͋͛ΔλΠϛϯά • ࣍ͷϝδϟʔΞοϓσʔτ͕ग़ͨΒͦͷલͷ࠷ޙ͋ͨΓΛݕ౼ • ຖճͦ͏͍͏Θ͚Ͱͳ͍͚Ͳ •
Expo SDK ࢀߟʹ 19
ϥΠϒϥϦपΓ • react-navigation • redux & redux-persist & immer •
react-native-maps • react-native-ble-manager • react-native-svg • react-native-vector-icons • react-native-linear-gradient • lottie-react-native • sentry 20
͋͑ͯͬͯͳ͍ͷ • Expo • OTA • Keychain पΓ • GeofenceपΓ
21
Expo • Native ͷίʔυΛॻ͔ͳ͍ͱ͍͏બࢶ͕ͳ͍ • Geofence, Siri ͱ͔ΞϓϦͷϩδοΫΛͦͷ··ॻ͘ඞཁ͕͋Δ 22
OTA • react-native ͷ version ʹґଘ͍ͯ͠ΔͷͰɺΞοϓσʔτͷᐫʹͨ͠ ͘ͳ͍ • ࣗͨͪͰίϯτʔϧͰ͖ͳ͍ͷΛ૿ͨ͘͠ͳ͍ •
࠷ۙ৹ࠪૣ͍ 23
Keychain पΓ • Keychain ͪΌΜͱॻ͘ͷ͕͍͠ • ৴པ͍ͯ͠ΔϥΠϒϥϦΛ͍͍ͨ • https://github.com/kishikawakatsumi/KeychainAccess •
ϥοϓͯͬͯ͠Δ 24
Geofence • ΞϓϦͷϩδοΫʹີ • iOS headless JS ͱ͍͏֓೦ͳ͍ͷͰωΠςΟϒͰී௨ʹॻ͘ • https://reactnative.dev/docs/headless-js-android
25
ଞʹ͍Ζ͍Ζ͋Δ • Native ʹߦॻ͚͍͍Α͏ͳͷࣗͨͪͰ༻ҙ͢Δ͜ͱ • ΦϑΟγϟϧ͕ϗετͯ͠ͳ͍ωΠςΟϒϥΠϒϥϦͷϥούʔϥΠϒϥ Ϧ͍͠ 26
React Native ʹύονૹͬͨΓ • Fix typescript constructor parameter properties •
https://github.com/facebook/metro/pull/262 • Fix some languages wrapped texts are cut off on android • https://github.com/facebook/react-native/pull/25306 27
Fix typescript constructor parameter properties 28 class Employee extends Person
{ constructor(public name: string) { super(); } }
Fix typescript constructor parameter properties 29 function Employee(name) { _classCallCheck(this,
Employee); return _possibleConstructorReturn(this, _getPrototypeOf(Employee).call(this)); } function Employee(name) { var _this; _classCallCheck(this, Employee); _this = _possibleConstructorReturn(this, _getPrototypeOf(Employee).call(this)); _this.name = name; return _this; }
Fix some languages wrapped texts are cut off on android
30 export default class App extends React.Component { render() { return ( <View style={{marginTop: 30}}> <Text>ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ</Text> <Text>͜ΕͰͪΐ͏Ͳेจࣈ͜ΕͰͪΐ͏Ͳेจࣈ͜ΕͰͪΐ͏Ͳेจࣈ͜ΕͰͪΐ͏Ͳेจࣈ</Text> <Text>͜ΕͰͪΐ͏Ͳेจࣈ͜ΕͰͪΐ͏Ͳेจࣈ</Text> <Text>㟬ૣ্㟬ૌഽ㟬ૣ্㟬ૌഽ㟬ૣ্㟬ૌഽ</Text> <Text>㟬ૣ্㟬ૌഽ</Text> </View> ); } }
Fix some languages wrapped texts are cut off on android
31
ύονΛͯͨReact Native Λ͏ • https://github.com/facebook/react-native/wiki/Building-from-source • 0.60 ͰऔΓࠐ·ΕͨͷͰɺͦΕ·Ͱ Patched React
Native Λͬͨ 32
iOSͷόά?Λݟ͚ͭͨΓ • iOS12 ͷຊޠڥͰӳޠ͚ͩͷγεςϜϑΥϯτ ͷ จࣈྻʹΧϯϚؚ͕·ΕΔͱṖͷleading ͕ൃੜ͢Δ ͱ͍͏όά • ଟ
iOS ଆ? iOS13 Ͱൃੜ͠ͳ͍ • https://twitter.com/soh335/status/ 1185552921049460737
Oppo A77 - Some texts gets cut-off • https://github.com/facebook/react-native/issues/ 15114
• One Plus, Oppo ͷσόΠεͰ༻ҙ͞ΕͯΔϑΥϯτ Λ͏ͱจࣈྻͷඳը͕͓͔͍͠
࠷ۙߟ͑ͯΔ͜ͱ
࣮ࡍ React Native Ͳ͏? • ී௨ʹ࡞ͬͯΕ iOS, Android, ͲͷαΠζͰಈ͘ͷͰྑ͍ •
ਖ਼ Android ਂ͘Θ͔Βͳ͍͚ͲΞϓϦ͕ී௨ʹ࡞ΕΔ • ͜ͷνʔϜنͰ1,2िؒʹҰͷΞοϓσʔτΈ͍ͨͳͷωΠςΟϒͦ ΕͧΕͩͱݫ͍͠ • TypeScript ͕ྑ͍ 36
࣮ࡍ React Native Ͳ͏? • Web ϑϩϯτΤϯυͬͯͳ͍͠ɺReact ʹڧ͍ݟ͕͋ΔΘ͚Ͱͳ͍ • ਖ਼ෳࡶͳ͜ͱͨ͘͠ͳ͍
• σβΠϯ͕Ͳ͔ͬͪʹدΓ͕ͪ (͏ͪ iOS ΑΓ) • ωΠςΟϒͷΞοϓσʔτͷΩϟονΞοϓ͕Ͱ͖ͳ͍ͱେม 37
ωΠςΟϒͷΞοϓσʔτͷΩϟονΞοϓ • ࠷ۙηΩϡϦςΟपΓͰݖݶपΓ͕ຖճมΘΔ • ඳը่͕ΕΔΈ͍ͨͳͷͦΜͳͳ͍ 38
React Native ͷόʔδϣϯΞοϓ • ຊମ͕ͦΜͳյΕΔҹͳ͍ • पลϥΠϒϥϦͷํ͕? • iOS, Android
ଆͷ OS ্͕͕ΔλΠϛϯάͷํ͕ͬͺΓؾʹͳΔ 39
ωΠςΟϒͰॻ͖͍ͨʁ • ϝϯόʔ૿͑ͨΒͦΕྑ͍͔ • ݁ہνʔϜͷߏʹΑΓͦ͏ • Ұ୴Ϗϧυͪ͠Ό͑ͬ͘͞ͱॻ͍ͯ֬ೝग़དྷΔମݧؾʹೖͬͯΔ 40
Hermes Ͳ͏ͳΜͰ͠ΐ͏ʁ • JSC ͷ 64bit ରԠ͋ͨΓ͔Βڍಈ͕एׯෆ҆ఆ • ύονͯͯ͘ΕͯΔͷ͕͋ͬͨΓ •
https://github.com/Kudo/jsc-android-buildscript 41
όοΫΤϯυʹؔͯ͠ • CTOͷڈͷొஃͷεϥΠυ͕͋Γ·͢ • https://blog.song.mu/entry/inside-nature-remo 42
࠾༻ͬͯ·͢ • εϚʔτϑΥϯΞϓϦΤϯδχΞ • όοΫΤϯυΤϯδχΞ • ΈࠐΈΤϯδχΞ • ػߏઃܭΤϯδχΞ •
ػցֶशΤϯδχΞ • SRE • https://nature.global/jp/careers 43