SlideShare a Scribd company logo
React Native
8
Yukiya Nakagawa
#DevFest17 @Nkzn
• @Nkzn /
• /
•
• React Native v0.17
• DroidKaigi 

2018 CfP 15
• React Native 4
3 CI/CD
•
JS
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
16% 22%
2% 60%
98%
React Native
• React
• JS
•
• /PoC
16% 22%
2% 60%
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Native
• React
• JS
•
• /PoC
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
16% 22%
2% 60%
16% 22%
2% 60%
16% 22%
2% 60%
• React Native JSer
• RN create-react-native-
app Expo
JSer
• JS React npm android/ ios/
• init
• Android
• iOS
•
• React
• JS Redux
• AltJS TypeScript FlowType
•
•
/
React Native
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
Agenda
•
1.Getting Started
2.applicationId/Bundle Identifier
3.
4.[Android] buildType
5.Fabric
6.Fabric
7.Fastlane
8.Firebase
A
1. Getting Started
init
$ npm install -g react-native-cli
$ react-native init MyAwesomeApp
$ cd MyAwesomeApp
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
index.android.js
index.ios.js
• RN 



”Write Once, Run Anywhere”
•
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
src
src/index.js
import React, { Component } from 'react';
import { AppRegistry, Text, View, StyleSheet } from 'react-native';
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.center}>
Hello, World!
</Text>
</View>
);
}
}
const styles = {/* */};
AppRegistry.registerComponent('MyAwesomeApp', () => App);
index.(android|ios).js
// index.android.js
import "./src";
// index.ios.js
import "./src";
•
• Flux, Redux
•
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
v0.49 Release Note
init
@v0.49
index.js
import { AppRegistry } from 'react-native';
import App from './App';
AppRegistry.registerComponent('MyAwesomeApp', () => App);
•
•
App.js src
src
•
• JSer React UI
2. applicationId &

Bundle Identifier
applicationId
Bundle Identifier
Bundle Identifier
init
android/app/build.gradle
android {
defaultConfig {
applicationId "com.myawesomeapp"
Xcode
init ID
•
• Android
ID
•
• applicationId Google Play
• Bundle Identifier AppStore
• com.[ ]
• iOS 

ID
•
•
info.nkzn.kitchentimer
• Android _ 

−
• iOS − 

_
• 

React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
• ID
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
android/app/build.gradle
android {
defaultConfig {
applicationId "com.myawesomeapp"
Xcode
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
3.
is
android {

defaultConfig {

versionCode 1

versionName "1.0"
android/app/build.gradle
ios/MyAwesomeApp/Info.plist
•
•
• Android versionCode
• Semantic Versioning(vX.Y.Z)
• X(major) UI
• Y(minor)
• Z(patch)
• JS
•
•
• Git
• package.json version
•
versionCode
• Google Play versionCode
• 1,2,3…
• v1.1.3(100) 101
v1.1.4 v1.2.0
versionCode
def major = 2;

def minor = 1;

def patch = 3;



android {

defaultConfig {

versionName "${major}.${minor}.${patch}" // 2.1.3

versionCode major * 10000 + minor * 100 + patch * 1 // 20103
android/app/build.gradle
•
• Google Play 

def major = 2;

def minor = 1;

def patch = 3;

def build = 4;



android {

defaultConfig {

versionName "${major}.${minor}.${patch}" // 2.1.3

versionCode major * 1000000 + minor * 10000
+ patch * 100 + build // 2010304
“version”: “2.1.3-build4”
android {

defaultConfig {

versionName “2.1.3”

versionCode 2010304
node build.gradle Info.plist
4. buildType
Android
•
•
• applicationId
•
applicationId
android {

buildTypes {

debug {

applicationIdSuffix ".debug"

}
}
android/app/build.gradle
💪
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
App Icon
<resources>

<string name=“app_name”>[debug]MyAwesomeApp</string>

</resources>
android/app/src/debug/res/values/strings.xml
android/app/src/release/res/values/strings.xml
<resources>

<string name=“app_name”>MyAwesomeApp</string>

</resources>
[debug] …
A
B
•
•
5. Fabric
Fabric
• https://get.fabric.io/
• Twitter
• Crashlytics
• Google Firebase
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
6. Fabric
•
• Google Play /
TestFlight
•
Beta
• Fabric
• Beta
• Fabric
←
• Android Studio Mac
7. Fastlane
• https://fastlane.tools/
• iOS/Android
• Google Play/iTunes
Connect
• CI GitLab CI
• Ruby 🤔
1. Git
2. CI Fastlane
3. Google Play/
iTunes Connect 🚀
4. 🎉
8. Firebase
• https://firebase.google.com/
•
AB
MBaaS
• React Native Firebase
•
•
B
○○
iOS
• iOS
• Schema Target
iOS CocoaPods
• CocoaPods iOS
• Google
•
• iOS
※
JS
•
•
• Sentry https://sentry.io/
RN
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
• Android SDK, Android Studio
• iOS SDK, Xcode
• npm
• Ruby (Fastlane )
• React Native JS
•
JS
React Native
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み

More Related Content

React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy