├── .babelrc ├── .eslintrc.js ├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── .prettierrc ├── App.js ├── README.md ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ └── fonts │ │ │ ├── AntDesign.ttf │ │ │ ├── Entypo.ttf │ │ │ ├── EvilIcons.ttf │ │ │ ├── Feather.ttf │ │ │ ├── FontAwesome.ttf │ │ │ ├── FontAwesome5_Brands.ttf │ │ │ ├── FontAwesome5_Regular.ttf │ │ │ ├── FontAwesome5_Solid.ttf │ │ │ ├── Foundation.ttf │ │ │ ├── Ionicons.ttf │ │ │ ├── MaterialCommunityIcons.ttf │ │ │ ├── MaterialIcons.ttf │ │ │ ├── Octicons.ttf │ │ │ ├── SimpleLineIcons.ttf │ │ │ └── Zocial.ttf │ │ ├── java │ │ └── com │ │ │ └── rni │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── app.json ├── app ├── actions │ ├── counter │ │ ├── actionTypes.js │ │ └── actions.js │ ├── session │ │ ├── actions.js │ │ └── actionsTypes.js │ └── todolist │ │ ├── actionTypes.js │ │ └── actions.js ├── components │ ├── auth │ │ ├── BasicForm │ │ │ ├── basicForm.js │ │ │ └── styles.js │ │ ├── LoginForm │ │ │ ├── index.js │ │ │ └── loginForm.js │ │ └── SignupForm │ │ │ ├── index.js │ │ │ └── signupForm.js │ ├── counter │ │ ├── counter.js │ │ ├── counterControl.js │ │ ├── counterOutput.js │ │ ├── index.js │ │ └── styles.js │ ├── home │ │ ├── home.js │ │ ├── index.js │ │ └── styles.js │ ├── loadingIndicator │ │ ├── loadingIndicator.js │ │ └── styles.js │ ├── routes │ │ ├── index.js │ │ ├── routes.js │ │ └── styles.js │ ├── search │ │ ├── index.js │ │ ├── search.js │ │ └── styles.js │ └── todolist │ │ ├── index.js │ │ ├── styles.js │ │ ├── todolist.js │ │ ├── todolistInput.js │ │ └── todolistItems.js ├── enviroments │ └── firebase.js ├── reducers │ ├── counter │ │ ├── __snapshots__ │ │ │ └── counterReducer.test.js.snap │ │ ├── counterReducer.js │ │ └── counterReducer.test.js │ ├── routes │ │ ├── routes.reducer.specs.js │ │ └── routesReducer.js │ ├── session │ │ └── sessionReducer.js │ └── todolist │ │ └── todolistReducer.js └── store │ ├── index.js │ ├── rootReducer.js │ └── store.js ├── assets ├── icons │ ├── firebase.png │ └── react.png └── screenshots │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── rfr.jpg ├── index.js ├── ios ├── RNI-tvOS │ └── Info.plist ├── RNI-tvOSTests │ └── Info.plist ├── RNI.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── RNI-tvOS.xcscheme │ │ └── RNI.xcscheme ├── RNI │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── RNITests │ ├── Info.plist │ └── RNITests.m ├── package-lock.json └── package.json /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["module:metro-react-native-babel-preset"], 3 | "plugins": [ 4 | [ 5 | "module-resolver", 6 | { 7 | "root": ["./app", "./assets"], 8 | "extensions": [".js", ".ios.js", ".android.js"] 9 | } 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: "babel-eslint", 3 | extends: ["plugin:prettier/recommended"], 4 | env: { 5 | jest: true 6 | }, 7 | settings: { 8 | "import/resolver": { "babel-module": {} } 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: 2 | - "https://www.paypal.com/paypalme/drskantus" 3 | github: "skantus" -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true 4 | } 5 | -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import Routes from 'components/routes'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ; 7 | } 8 | } 9 | 10 | export default App; 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 | 7 | 8 | 9 |

10 | 11 | ## How to Install 12 | 13 | 1. `git clone https://github.com/skantus/react-native-firebase-redux-authentication.git` 14 | 2. `cd && rm -rf .rncache` 15 | 3. `watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/haste-map-react-native-packager-* && rm -rf node_modules/ && npm install` 16 | 4. `npm start -- --reset-cache` 17 | 5. `react-native run-ios | run-android` 18 | 19 | ## Expo 20 | 21 | _See the project too in:_ 22 | 23 | 24 | 25 | https://expo.io/@skantus/ 26 | 27 | ## Login method 28 | 29 | Done 30 | 31 | ## Logout method 32 | 33 | Done 34 | 35 | ## Current session method 36 | 37 | Done 38 | 39 | ## Signup method 40 | 41 | Done 42 | 43 | ## To-Do List (Redux) 44 | 45 | Added 46 | 47 | ## Counter (Redux) 48 | 49 | Refactored 50 | 51 | ## Table of Contents 52 | 53 | - [Updating to New Releases](#updating-to-new-releases) 54 | - [Available Scripts](#available-scripts) 55 | - [npm start](#npm-start) 56 | - [npm test](#npm-test) 57 | - [npm run ios](#npm-run-ios) 58 | - [npm run android](#npm-run-android) 59 | - [npm run eject](#npm-run-eject) 60 | - [Writing and Running Tests](#writing-and-running-tests) 61 | - [Environment Variables](#environment-variables) 62 | - [Configuring Packager IP Address](#configuring-packager-ip-address) 63 | - [Adding Flow](#adding-flow) 64 | - [Customizing App Display Name and Icon](#customizing-app-display-name-and-icon) 65 | - [Sharing and Deployment](#sharing-and-deployment) 66 | - [Publishing to Expo's React Native Community](#publishing-to-expos-react-native-community) 67 | - [Building an Expo "standalone" app](#building-an-expo-standalone-app) 68 | - [Ejecting from Create React Native App](#ejecting-from-create-react-native-app) 69 | - [Build Dependencies (Xcode & Android Studio)](#build-dependencies-xcode-android-studio) 70 | - [Should I Use ExpoKit?](#should-i-use-expokit) 71 | - [Troubleshooting](#troubleshooting) 72 | - [Networking](#networking) 73 | - [iOS Simulator won't open](#ios-simulator-wont-open) 74 | - [QR Code does not scan](#qr-code-does-not-scan) 75 | 76 | ## Updating to New Releases 77 | 78 | You should only need to update the global installation of `create-react-native-app` very rarely, ideally never. 79 | 80 | Updating the `react-native-scripts` dependency of your app should be as simple as bumping the version number in `package.json` and reinstalling your project's dependencies. 81 | 82 | Upgrading to a new version of React Native requires updating the `react-native`, `react`, and `expo` package versions, and setting the correct `sdkVersion` in `app.json`. See the [versioning guide](https://github.com/react-community/create-react-native-app/blob/master/VERSIONS.md) for up-to-date information about package version compatibility. 83 | 84 | ## Available Scripts 85 | 86 | If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, command running syntax is identical for Yarn and NPM at the time of this writing. 87 | 88 | ### `npm start` 89 | 90 | Runs your app in development mode. 91 | 92 | Open it in the [Expo app](https://expo.io) on your phone to view it. It will reload if you save edits to your files, and you will see build errors and logs in the terminal. 93 | 94 | Sometimes you may need to reset or clear the React Native packager's cache. To do so, you can pass the `--reset-cache` flag to the start script: 95 | 96 | ``` 97 | npm start -- --reset-cache 98 | # or 99 | yarn start -- --reset-cache 100 | ``` 101 | 102 | #### `npm test` 103 | 104 | Runs the [jest](https://github.com/facebook/jest) test runner on your tests. 105 | 106 | #### `npm run ios` 107 | 108 | Like `npm start`, but also attempts to open your app in the iOS Simulator if you're on a Mac and have it installed. 109 | 110 | #### `npm run android` 111 | 112 | Like `npm start`, but also attempts to open your app on a connected Android device or emulator. Requires an installation of Android build tools (see [React Native docs](https://facebook.github.io/react-native/docs/getting-started.html) for detailed setup). We also recommend installing Genymotion as your Android emulator. Once you've finished setting up the native build environment, there are two options for making the right copy of `adb` available to Create React Native App: 113 | 114 | ##### Using Android Studio's `adb` 115 | 116 | 1. Make sure that you can run adb from your terminal. 117 | 2. Open Genymotion and navigate to `Settings -> ADB`. Select “Use custom Android SDK tools” and update with your [Android SDK directory](https://stackoverflow.com/questions/25176594/android-sdk-location). 118 | 119 | ##### Using Genymotion's `adb` 120 | 121 | 1. Find Genymotion’s copy of adb. On macOS for example, this is normally `/Applications/Genymotion.app/Contents/MacOS/tools/`. 122 | 2. Add the Genymotion tools directory to your path (instructions for [Mac](http://osxdaily.com/2014/08/14/add-new-path-to-path-command-line/), [Linux](http://www.computerhope.com/issues/ch001647.htm), and [Windows](https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/)). 123 | 3. Make sure that you can run adb from your terminal. 124 | 125 | #### `npm run eject` 126 | 127 | This will start the process of "ejecting" from Create React Native App's build scripts. You'll be asked a couple of questions about how you'd like to build your project. 128 | 129 | **Warning:** Running eject is a permanent action (aside from whatever version control system you use). An ejected app will require you to have an [Xcode and/or Android Studio environment](https://facebook.github.io/react-native/docs/getting-started.html) set up. 130 | 131 | ## Customizing App Display Name and Icon 132 | 133 | You can edit `app.json` to include [configuration keys](https://docs.expo.io/versions/latest/guides/configuration.html) under the `expo` key. 134 | 135 | To change your app's display name, set the `expo.name` key in `app.json` to an appropriate string. 136 | 137 | To set an app icon, set the `expo.icon` key in `app.json` to be either a local path or a URL. It's recommended that you use a 512x512 png file with transparency. 138 | 139 | ## Writing and Running Tests 140 | 141 | This project is set up to use [jest](https://facebook.github.io/jest/) for tests. You can configure whatever testing strategy you like, but jest works out of the box. Create test files in directories called `__tests__` or with the `.test` extension to have the files loaded by jest. See the [the template project](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/App.test.js) for an example test. The [jest documentation](https://facebook.github.io/jest/docs/en/getting-started.html) is also a wonderful resource, as is the [React Native testing tutorial](https://facebook.github.io/jest/docs/en/tutorial-react-native.html). 142 | 143 | ## Environment Variables 144 | 145 | You can configure some of Create React Native App's behavior using environment variables. 146 | 147 | ### Configuring Packager IP Address 148 | 149 | When starting your project, you'll see something like this for your project URL: 150 | 151 | ``` 152 | exp://192.168.0.2:19000 153 | ``` 154 | 155 | The "manifest" at that URL tells the Expo app how to retrieve and load your app's JavaScript bundle, so even if you load it in the app via a URL like `exp://localhost:19000`, the Expo client app will still try to retrieve your app at the IP address that the start script provides. 156 | 157 | In some cases, this is less than ideal. This might be the case if you need to run your project inside of a virtual machine and you have to access the packager via a different IP address than the one which prints by default. In order to override the IP address or hostname that is detected by Create React Native App, you can specify your own hostname via the `REACT_NATIVE_PACKAGER_HOSTNAME` environment variable: 158 | 159 | Mac and Linux: 160 | 161 | ``` 162 | REACT_NATIVE_PACKAGER_HOSTNAME='my-custom-ip-address-or-hostname' npm start 163 | ``` 164 | 165 | Windows: 166 | 167 | ``` 168 | set REACT_NATIVE_PACKAGER_HOSTNAME='my-custom-ip-address-or-hostname' 169 | npm start 170 | ``` 171 | 172 | The above example would cause the development server to listen on `exp://my-custom-ip-address-or-hostname:19000`. 173 | 174 | ## Adding Flow 175 | 176 | Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. 177 | 178 | React Native works with [Flow](http://flowtype.org/) out of the box, as long as your Flow version matches the one used in the version of React Native. 179 | 180 | To add a local dependency to the correct Flow version to a Create React Native App project, follow these steps: 181 | 182 | 1. Find the Flow `[version]` at the bottom of the included [.flowconfig](.flowconfig) 183 | 2. Run `npm install --save-dev flow-bin@x.y.z` (or `yarn add --dev flow-bin@x.y.z`), where `x.y.z` is the .flowconfig version number. 184 | 3. Add `"flow": "flow"` to the `scripts` section of your `package.json`. 185 | 4. Add `// @flow` to any files you want to type check (for example, to `App.js`). 186 | 187 | Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. 188 | You can optionally use a [plugin for your IDE or editor](https://flow.org/en/docs/editors/) for a better integrated experience. 189 | 190 | To learn more about Flow, check out [its documentation](https://flow.org/). 191 | 192 | ## Sharing and Deployment 193 | 194 | Create React Native App does a lot of work to make app setup and development simple and straightforward, but it's very difficult to do the same for deploying to Apple's App Store or Google's Play Store without relying on a hosted service. 195 | 196 | ### Publishing to Expo's React Native Community 197 | 198 | Expo provides free hosting for the JS-only apps created by CRNA, allowing you to share your app through the Expo client app. This requires registration for an Expo account. 199 | 200 | Install the `exp` command-line tool, and run the publish command: 201 | 202 | ``` 203 | $ npm i -g exp 204 | $ exp publish 205 | ``` 206 | 207 | ### Building an Expo "standalone" app 208 | 209 | You can also use a service like [Expo's standalone builds](https://docs.expo.io/versions/latest/guides/building-standalone-apps.html) if you want to get an IPA/APK for distribution without having to build the native code yourself. 210 | 211 | ### Ejecting from Create React Native App 212 | 213 | If you want to build and deploy your app yourself, you'll need to eject from CRNA and use Xcode and Android Studio. 214 | 215 | This is usually as simple as running `npm run eject` in your project, which will walk you through the process. Make sure to install `react-native-cli` and follow the [native code getting started guide for React Native](https://facebook.github.io/react-native/docs/getting-started.html). 216 | 217 | #### Should I Use ExpoKit? 218 | 219 | If you have made use of Expo APIs while working on your project, then those API calls will stop working if you eject to a regular React Native project. If you want to continue using those APIs, you can eject to "React Native + ExpoKit" which will still allow you to build your own native code and continue using the Expo APIs. See the [ejecting guide](https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md) for more details about this option. 220 | 221 | ## Troubleshooting 222 | 223 | ### Networking 224 | 225 | If you're unable to load your app on your phone due to a network timeout or a refused connection, a good first step is to verify that your phone and computer are on the same network and that they can reach each other. Create React Native App needs access to ports 19000 and 19001 so ensure that your network and firewall settings allow access from your device to your computer on both of these ports. 226 | 227 | Try opening a web browser on your phone and opening the URL that the packager script prints, replacing `exp://` with `http://`. So, for example, if underneath the QR code in your terminal you see: 228 | 229 | ``` 230 | exp://192.168.0.1:19000 231 | ``` 232 | 233 | Try opening Safari or Chrome on your phone and loading 234 | 235 | ``` 236 | http://192.168.0.1:19000 237 | ``` 238 | 239 | and 240 | 241 | ``` 242 | http://192.168.0.1:19001 243 | ``` 244 | 245 | If this works, but you're still unable to load your app by scanning the QR code, please open an issue on the [Create React Native App repository](https://github.com/react-community/create-react-native-app) with details about these steps and any other error messages you may have received. 246 | 247 | If you're not able to load the `http` URL in your phone's web browser, try using the tethering/mobile hotspot feature on your phone (beware of data usage, though), connecting your computer to that WiFi network, and restarting the packager. 248 | 249 | ### iOS Simulator won't open 250 | 251 | If you're on a Mac, there are a few errors that users sometimes see when attempting to `npm run ios`: 252 | 253 | - "non-zero exit code: 107" 254 | - "You may need to install Xcode" but it is already installed 255 | - and others 256 | 257 | There are a few steps you may want to take to troubleshoot these kinds of errors: 258 | 259 | 1. Make sure Xcode is installed and open it to accept the license agreement if it prompts you. You can install it from the Mac App Store. 260 | 2. Open Xcode's Preferences, the Locations tab, and make sure that the `Command Line Tools` menu option is set to something. Sometimes when the CLI tools are first installed by Homebrew this option is left blank, which can prevent Apple utilities from finding the simulator. Make sure to re-run `npm/yarn run ios` after doing so. 261 | 3. If that doesn't work, open the Simulator, and under the app menu select `Reset Contents and Settings...`. After that has finished, quit the Simulator, and re-run `npm/yarn run ios`. 262 | 263 | ### QR Code does not scan 264 | 265 | If you're not able to scan the QR code, make sure your phone's camera is focusing correctly, and also make sure that the contrast on the two colors in your terminal is high enough. For example, WebStorm's default themes may [not have enough contrast](https://github.com/react-community/create-react-native-app/issues/49) for terminal QR codes to be scannable with the system barcode scanners that the Expo app uses. 266 | 267 | If this causes problems for you, you may want to try changing your terminal's color theme to have more contrast, or running Create React Native App from a different terminal. You can also manually enter the URL printed by the packager script in the Expo app's search bar to load it manually. 268 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | lib_deps = [] 12 | 13 | for jarfile in glob(['libs/*.jar']): 14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] 15 | lib_deps.append(':' + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | 21 | for aarfile in glob(['libs/*.aar']): 22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] 23 | lib_deps.append(':' + name) 24 | android_prebuilt_aar( 25 | name = name, 26 | aar = aarfile, 27 | ) 28 | 29 | android_library( 30 | name = "all-libs", 31 | exported_deps = lib_deps, 32 | ) 33 | 34 | android_library( 35 | name = "app-code", 36 | srcs = glob([ 37 | "src/main/java/**/*.java", 38 | ]), 39 | deps = [ 40 | ":all-libs", 41 | ":build_config", 42 | ":res", 43 | ], 44 | ) 45 | 46 | android_build_config( 47 | name = "build_config", 48 | package = "com.rni", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.rni", 54 | res = "src/main/res", 55 | ) 56 | 57 | android_binary( 58 | name = "app", 59 | keystore = "//android/keystores:debug", 60 | manifest = "src/main/AndroidManifest.xml", 61 | package_type = "debug", 62 | deps = [ 63 | ":app-code", 64 | ], 65 | ) 66 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 37 | * // for example: to disable dev mode in the staging build type (if configured) 38 | * devDisabledInStaging: true, 39 | * // The configuration property can be in the following formats 40 | * // 'devDisabledIn${productFlavor}${buildType}' 41 | * // 'devDisabledIn${buildType}' 42 | * 43 | * // the root of your project, i.e. where "package.json" lives 44 | * root: "../../", 45 | * 46 | * // where to put the JS bundle asset in debug mode 47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 48 | * 49 | * // where to put the JS bundle asset in release mode 50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 51 | * 52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 53 | * // require('./image.png')), in debug mode 54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 55 | * 56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 57 | * // require('./image.png')), in release mode 58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 59 | * 60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 64 | * // for example, you might want to remove it from here. 65 | * inputExcludes: ["android/**", "ios/**"], 66 | * 67 | * // override which node gets called and with what additional arguments 68 | * nodeExecutableAndArgs: ["node"], 69 | * 70 | * // supply additional arguments to the packager 71 | * extraPackagerArgs: [] 72 | * ] 73 | */ 74 | 75 | project.ext.react = [ 76 | entryFile: "index.js" 77 | ] 78 | 79 | apply from: "../../node_modules/react-native/react.gradle" 80 | 81 | /** 82 | * Set this to true to create two separate APKs instead of one: 83 | * - An APK that only works on ARM devices 84 | * - An APK that only works on x86 devices 85 | * The advantage is the size of the APK is reduced by about 4MB. 86 | * Upload all the APKs to the Play Store and people will download 87 | * the correct one based on the CPU architecture of their device. 88 | */ 89 | def enableSeparateBuildPerCPUArchitecture = false 90 | 91 | /** 92 | * Run Proguard to shrink the Java bytecode in release builds. 93 | */ 94 | def enableProguardInReleaseBuilds = false 95 | 96 | android { 97 | compileSdkVersion rootProject.ext.compileSdkVersion 98 | buildToolsVersion rootProject.ext.buildToolsVersion 99 | 100 | defaultConfig { 101 | applicationId "com.rni" 102 | minSdkVersion rootProject.ext.minSdkVersion 103 | targetSdkVersion rootProject.ext.targetSdkVersion 104 | versionCode 1 105 | versionName "1.0" 106 | ndk { 107 | abiFilters "armeabi-v7a", "x86" 108 | } 109 | } 110 | splits { 111 | abi { 112 | reset() 113 | enable enableSeparateBuildPerCPUArchitecture 114 | universalApk false // If true, also generate a universal APK 115 | include "armeabi-v7a", "x86" 116 | } 117 | } 118 | buildTypes { 119 | release { 120 | minifyEnabled enableProguardInReleaseBuilds 121 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 122 | } 123 | } 124 | // applicationVariants are e.g. debug, release 125 | applicationVariants.all { variant -> 126 | variant.outputs.each { output -> 127 | // For each separate APK per architecture, set a unique version code as described here: 128 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 129 | def versionCodes = ["armeabi-v7a":1, "x86":2] 130 | def abi = output.getFilter(OutputFile.ABI) 131 | if (abi != null) { // null for the universal-debug, universal-release variants 132 | output.versionCodeOverride = 133 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 134 | } 135 | } 136 | } 137 | } 138 | 139 | dependencies { 140 | implementation project(':react-native-vector-icons') 141 | implementation fileTree(dir: "libs", include: ["*.jar"]) 142 | implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" 143 | implementation "com.facebook.react:react-native:+" // From node_modules 144 | } 145 | 146 | // Run this once to be able to run the application with BUCK 147 | // puts all compile dependencies into folder libs for BUCK to use 148 | task copyDownloadableDepsToLibs(type: Copy) { 149 | from configurations.compile 150 | into 'libs' 151 | } 152 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/AntDesign.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/AntDesign.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Feather.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/Feather.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /android/app/src/main/java/com/rni/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.rni; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "RNI"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rni/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.rni; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import com.oblador.vectoricons.VectorIconsPackage; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.shell.MainReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | public class MainApplication extends Application implements ReactApplication { 16 | 17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | return Arrays.asList( 26 | new MainReactPackage(), 27 | new VectorIconsPackage() 28 | ); 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | }; 36 | 37 | @Override 38 | public ReactNativeHost getReactNativeHost() { 39 | return mReactNativeHost; 40 | } 41 | 42 | @Override 43 | public void onCreate() { 44 | super.onCreate(); 45 | SoLoader.init(this, /* native exopackage */ false); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RNI 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 19 7 | compileSdkVersion = 28 8 | targetSdkVersion = 26 9 | supportLibVersion = "27.1.0" 10 | } 11 | repositories { 12 | google() 13 | jcenter() 14 | } 15 | dependencies { 16 | classpath 'com.android.tools.build:gradle:3.2.1' 17 | 18 | // NOTE: Do not place your application dependencies here; they belong 19 | // in the individual module build.gradle files 20 | } 21 | } 22 | 23 | allprojects { 24 | repositories { 25 | mavenLocal() 26 | maven { url 'https://maven.google.com' } 27 | maven { url "https://jitpack.io" } 28 | jcenter() 29 | maven { 30 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 31 | url "$rootDir/../node_modules/react-native/android" 32 | } 33 | } 34 | } 35 | 36 | subprojects { 37 | afterEvaluate {project -> 38 | if (project.hasProperty("android")) { 39 | android { 40 | compileSdkVersion 28 41 | buildToolsVersion "28.0.3" 42 | } 43 | } 44 | } 45 | } 46 | 47 | project.configurations.all { 48 | resolutionStrategy.eachDependency { details -> 49 | if (details.requested.group == 'com.android.support' && ! 50 | details.requested.name.contains('multidex')) { 51 | details.useVersion "28.0.3" 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skantus/react-native-firebase-redux-authentication/e740be9be8d381cef6d5fd4c9c39d89c52dace81/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'RNI' 2 | include ':react-native-vector-icons' 3 | project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') 4 | 5 | include ':app' 6 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RNI", 3 | "displayName": "React Native App" 4 | } 5 | -------------------------------------------------------------------------------- /app/actions/counter/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const INCREMENT = 'INCREMENT'; 2 | export const DECREMENT = 'DECREMENT'; 3 | export const ADD = 'ADD'; 4 | export const SUBTRACTION = 'SUBTRACTION'; 5 | -------------------------------------------------------------------------------- /app/actions/counter/actions.js: -------------------------------------------------------------------------------- 1 | import * as types from './actionTypes'; 2 | 3 | export const Increment = () => dispatch => { 4 | dispatch(increment()); 5 | }; 6 | 7 | export const Decrement = () => dispatch => { 8 | dispatch(decrement()); 9 | }; 10 | 11 | export const Add = val => dispatch => { 12 | dispatch(add(val)); 13 | }; 14 | 15 | export const Subtration = val => dispatch => { 16 | dispatch(subtraction(val)); 17 | }; 18 | 19 | const increment = () => ({ 20 | type: types.INCREMENT 21 | }); 22 | 23 | const decrement = () => ({ 24 | type: types.DECREMENT 25 | }); 26 | 27 | const add = value => ({ 28 | type: types.ADD, 29 | value 30 | }); 31 | 32 | const subtraction = value => ({ 33 | type: types.SUBTRACTION, 34 | value 35 | }); 36 | -------------------------------------------------------------------------------- /app/actions/session/actions.js: -------------------------------------------------------------------------------- 1 | import firebaseService from 'enviroments/firebase'; 2 | import * as types from './actionsTypes'; 3 | 4 | export const restoreSession = () => dispatch => { 5 | dispatch(sessionLoading()); 6 | dispatch(sessionRestoring()); 7 | 8 | firebaseService.auth().onAuthStateChanged(user => { 9 | if (user) { 10 | dispatch(sessionSuccess(user)); 11 | } else { 12 | dispatch(sessionLogout()); 13 | } 14 | }); 15 | }; 16 | 17 | export const loginUser = (email, password) => dispatch => { 18 | dispatch(sessionLoading()); 19 | 20 | firebaseService 21 | .auth() 22 | .signInWithEmailAndPassword(email, password) 23 | .then(user => { 24 | dispatch(sessionSuccess(user)); 25 | }) 26 | .catch(error => { 27 | dispatch(sessionError(error.message)); 28 | }); 29 | }; 30 | 31 | export const signupUser = (email, password) => dispatch => { 32 | dispatch(sessionLoading()); 33 | 34 | firebaseService 35 | .auth() 36 | .createUserWithEmailAndPassword(email, password) 37 | .then(user => { 38 | dispatch(signupSuccess(user)); 39 | }) 40 | .catch(error => { 41 | dispatch(sessionError(error.message)); 42 | }); 43 | }; 44 | 45 | export const logoutUser = () => dispatch => { 46 | dispatch(sessionLoading()); 47 | 48 | firebaseService 49 | .auth() 50 | .signOut() 51 | .then(() => { 52 | dispatch(sessionLogout()); 53 | }) 54 | .catch(error => { 55 | dispatch(sessionError(error.message)); 56 | }); 57 | }; 58 | 59 | const sessionRestoring = () => ({ 60 | type: types.SESSION_RESTORING 61 | }); 62 | 63 | const sessionLoading = () => ({ 64 | type: types.SESSION_LOADING 65 | }); 66 | 67 | const sessionSuccess = user => ({ 68 | type: types.SESSION_SUCCESS, 69 | user 70 | }); 71 | 72 | const signupSuccess = user => ({ 73 | type: types.SIGNUP_SUCCESS, 74 | user 75 | }); 76 | 77 | const sessionError = error => ({ 78 | type: types.SESSION_ERROR, 79 | error 80 | }); 81 | 82 | const sessionLogout = () => ({ 83 | type: types.SESSION_LOGOUT 84 | }); 85 | -------------------------------------------------------------------------------- /app/actions/session/actionsTypes.js: -------------------------------------------------------------------------------- 1 | export const SESSION_RESTORING = 'SESSION_RESTORING'; 2 | export const SESSION_LOADING = 'SESSION_LOADING'; 3 | export const SESSION_SUCCESS = 'SESSION_SUCCESS'; 4 | export const SIGNUP_SUCCESS = 'SIGNUP_SUCCESS'; 5 | export const SESSION_ERROR = 'SESSION_ERROR'; 6 | export const SESSION_LOGOUT = 'SESSION_LOGOUT'; 7 | -------------------------------------------------------------------------------- /app/actions/todolist/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const ADD = 'ADD'; 2 | export const REMOVE = 'REMOVE'; 3 | -------------------------------------------------------------------------------- /app/actions/todolist/actions.js: -------------------------------------------------------------------------------- 1 | import * as types from './actionTypes'; 2 | 3 | export const Add = item => dispatch => { 4 | dispatch(add(item)); 5 | }; 6 | 7 | export const Remove = index => dispatch => { 8 | dispatch(remove(index)); 9 | }; 10 | 11 | export const add = item => ({ 12 | type: types.ADD, 13 | todo: item 14 | }); 15 | 16 | export const remove = index => ({ 17 | type: types.REMOVE, 18 | index: index 19 | }); 20 | -------------------------------------------------------------------------------- /app/components/auth/BasicForm/basicForm.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { View, TextInput, TouchableOpacity, Text } from 'react-native'; 3 | import { styles } from './styles'; 4 | 5 | export class BasicFormComponent extends Component { 6 | state = { email: '', password: '' }; 7 | 8 | handleEmailChange = email => this.setState({ email }); 9 | 10 | handlePasswordChange = password => this.setState({ password }); 11 | 12 | handleButtonPress = () => { 13 | const { email, password } = this.state; 14 | this.props.onButtonPress(email, password); 15 | }; 16 | 17 | render() { 18 | const { email, password } = this.state; 19 | const { textInput, button, buttonTitle } = styles; 20 | return ( 21 | 22 | 32 | 33 | 42 | 43 | 44 | {this.props.buttonTitle} 45 | 46 | 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/components/auth/BasicForm/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export const styles = StyleSheet.create({ 4 | container: { 5 | flex: 1, 6 | alignItems: 'stretch', 7 | justifyContent: 'center' 8 | }, 9 | textInput: { 10 | backgroundColor: '#ffffff', 11 | padding: 10, 12 | height: 40, 13 | margin: 10, 14 | borderRadius: 5 15 | }, 16 | button: { 17 | alignItems: 'center', 18 | justifyContent: 'center', 19 | height: 40, 20 | margin: 10, 21 | borderRadius: 5, 22 | padding: 3, 23 | backgroundColor: '#88cc88' 24 | }, 25 | buttonTitle: { 26 | color: '#ffffff', 27 | fontSize: 18, 28 | fontWeight: 'bold' 29 | }, 30 | loginBox: { 31 | margin: 10 32 | }, 33 | imageBox: { 34 | alignItems: 'center', 35 | marginTop: 20 36 | }, 37 | image: { 38 | width: 120, 39 | height: 120 40 | }, 41 | scrollView: { 42 | backgroundColor: '#2299ec' 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /app/components/auth/LoginForm/index.js: -------------------------------------------------------------------------------- 1 | import LoginFormComponent from './loginForm'; 2 | 3 | export default LoginFormComponent; 4 | -------------------------------------------------------------------------------- /app/components/auth/LoginForm/loginForm.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { View, Alert, Image, Button } from 'react-native'; 3 | import { connect } from 'react-redux'; 4 | import { BasicFormComponent } from '../BasicForm/basicForm'; 5 | import { LoadingIndicator } from 'components/loadingIndicator/loadingIndicator'; 6 | import { styles } from '../BasicForm/styles'; 7 | import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; 8 | import { Actions } from 'react-native-router-flux'; 9 | import { loginUser, restoreSession } from 'actions/session/actions'; 10 | 11 | const FIREBASE_LOGO = require('icons/firebase.png'); 12 | 13 | class LoginFormComponent extends Component { 14 | componentDidMount() { 15 | this.props.restore(); 16 | } 17 | 18 | componentDidUpdate(prevProps) { 19 | const { error, logged } = this.props; 20 | 21 | if (!prevProps.error && error) Alert.alert('error', error); 22 | 23 | if (logged) Actions.reset('home'); 24 | } 25 | 26 | render() { 27 | const { login, loading } = this.props; 28 | const { scrollView, imageBox, image, loginBox } = styles; 29 | return ( 30 | 31 | 32 | 33 | 34 | 35 | {loading ? ( 36 | 37 | ) : ( 38 | 39 | )} 40 | 41 | {loading ? null :