$ npm install -g react-native-cli
$ react-native
https://facebook.github.io/react-native/docs/getting-started.html
https://facebook.github.io/react-native/docs/signed-apk-android.html
cd android/app
keytool -genkey -v -keystore projectname.keystore -alias projectname -keyalg RSA -keysize 2048 -validity 10000
nano ~/.gradle/gradle.properties
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****
# android/app/build.gradle
...
android {
...
defaultConfig { ... }
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
release {
...
signingConfig signingConfigs.release
}
}
}
...
# Generating the release APK
cd android && ./gradlew assembleRelease
adb install app/build/outputs/apk/app-release.apk
# OR
react-native run-android --variant=release
npm i --save-dev eslint eslint-plugin-react
npm i --save react-redux redux
http://redux.js.org/
npm i --save redux-thunk
https://github.com/gaearon/redux-thunk
npm i --save-dev redux-logger
https://github.com/evgenyrodionov/redux-logger
npm install --save react-navigation
https://github.com/invertase/react-native-firebase
npm install --save firebase
npm install --save react-native-firebase
# Generate SHA1
keytool -exportcert -list -v -alias MYAPP -keystore android/app/MYAPP.keystore
https://console.firebase.google.com/project/pojectname/settings/general/
https://github.com/devfd/react-native-google-signin
npm install react-native-google-signin --save
react-native link react-native-google-signin
# Err multiDex - android/app/build.gradle
android {
defaultConfig {
multiDexEnabled true // this line will solve this problem
}
}
# https://console.firebase.google.com/project/project/authentication/providers
GoogleSignin.configure({ webClientId: 'ID do cliente da Web' });
https://github.com/facebook/react-native-fbsdk
npm install react-native-fbsdk@0.6.0 --save
react-native link react-native-fbsdk
https://developers.facebook.com/docs/android/getting-started/
# Quick Start
Produtos -> Login do Facebook -> Configurações
URIs de redirecionamento do OAuth válidos
* Login do OAuth no navegador incorporado - Sim
* URIs de redirecionamento do OAuth válidos
* https://firebaseappexample.firebaseapp.com/__/auth/handler
* firebaseappexample.firebaseapp.com
Produtos -> Login do Facebook -> Início rápido || Configurações -> Básico -> Adicionar plataforma -> Android
Nome do pacote do Google Play: com.app
Nome da classe: com.app.MainActivity
Hashes chave: (keytool -exportcert -alias app -keystore android/app/app.keystore | openssl sha1 -binary | openssl base64)
# Add Facebook App ID
# Fix Error Remove Line 61 - @Override
node_modules/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java
https://docs.nativebase.io/docs/GetStarted.html
npm install native-base --save
react-native link
https://github.com/chriso/validator.js
npm install --save validator