├── .gitattributes ├── .gitignore ├── .npmignore ├── .prettierrc ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── LICENSE.md ├── README.md ├── android ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── io │ └── rumors │ └── reactnativefirebaseui │ ├── RNFirebaseUiModule.java │ ├── RNFirebaseUiPackage.java │ └── storage │ ├── ExtendedImageView.java │ ├── ExtendedPhotoView.java │ ├── FirebaseImageViewManager.java │ ├── FirebasePhotoViewManager.java │ └── ImageLoaderGlideModule.java ├── example ├── .buckconfig ├── .editorconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .opensource │ └── project.json ├── .prettierrc.js ├── .watchmanconfig ├── App.js ├── App.test.js ├── LICENSE ├── README.md ├── android │ ├── .editorconfig │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── build_defs.bzl │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── rmrs │ │ │ │ └── reactnativefirebaseuiexample │ │ │ │ ├── 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 ├── assets │ ├── ReactNativeFirebase.png │ └── placeholder.png ├── babel.config.js ├── bin │ └── rename.js ├── index.js ├── ios │ ├── Podfile │ ├── Podfile.lock │ ├── ReactNativeFirebaseUIExample-tvOS │ │ └── Info.plist │ ├── ReactNativeFirebaseUIExample-tvOSTests │ │ └── Info.plist │ ├── ReactNativeFirebaseUIExample.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── ReactNativeFirebaseUIExample-tvOS.xcscheme │ │ │ └── ReactNativeFirebaseUIExample.xcscheme │ ├── ReactNativeFirebaseUIExample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── ReactNativeFirebaseUIExample.xcworkspace:contents.xcworkspacedata │ ├── ReactNativeFirebaseUIExample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ └── ReactNativeFirebaseUIExampleTests │ │ ├── Info.plist │ │ └── ReactNativeFirebaseUIExampleTests.m ├── metro.config.js ├── package.json └── yarn.lock ├── index.js ├── ios ├── FirebaseUIImageView.h ├── FirebaseUIImageView.m ├── RCTFirebaseImageViewManager.h ├── RCTFirebaseImageViewManager.m ├── RNFirebaseUi.xcodeproj │ └── project.pbxproj ├── UIImageView+FirebaseStorage.h └── UIImageView+FirebaseStorage.m ├── package.json ├── react-native-firebaseui.podspec ├── src ├── index.android.js ├── index.js └── interface.js └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # OSX 3 | # 4 | .DS_Store 5 | 6 | # node.js 7 | # 8 | node_modules/ 9 | npm-debug.log 10 | yarn-error.log 11 | 12 | 13 | # Xcode 14 | # 15 | build/ 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | xcuserdata 25 | *.xccheckout 26 | *.moved-aside 27 | DerivedData 28 | *.hmap 29 | *.ipa 30 | *.xcuserstate 31 | project.xcworkspace 32 | 33 | 34 | # Android/IntelliJ 35 | # 36 | build/ 37 | .idea 38 | .gradle 39 | local.properties 40 | *.iml 41 | .project 42 | .settings 43 | 44 | # BUCK 45 | buck-out/ 46 | \.buckd/ 47 | *.keystore 48 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .nyc_output 4 | npm-debug.log 5 | yarn-debug.log 6 | example 7 | android/build/ -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "semi": true, 5 | "singleQuote": true, 6 | "trailingComma": "all", 7 | "useTabs": false, 8 | "overrides": [ 9 | { 10 | "files": "*.json", 11 | "options": { "printWidth": 200 } 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "javascript.preferences.quoteStyle": "single", 3 | "editor.formatOnSave": true, 4 | "java.configuration.updateBuildConfiguration": "disabled" 5 | } 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@rumors.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Rumors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-firebaseui 2 | 3 | ## Requirements 4 | 5 | We assume you already have firebase sdk installed and configured. 6 | We're using this great library: 7 | [react-native-firebase](https://github.com/invertase/react-native-firebase) 8 | 9 | ## Getting started 10 | 11 | `$ npm install react-native-firebaseui --save` 12 | 13 | ### Mostly automatic installation 14 | 15 | `$ react-native link react-native-firebaseui` 16 | 17 | For iOS add the following pod to your podfile: 18 | 19 | ```pod 20 | pod 'SDWebImage', '~> 4.0' 21 | ``` 22 | 23 | and run pod install. 24 | 25 | ## Android Additional step for PhotoView Library 26 | 27 | Add this in your root build.gradle file (usually under `android/build.gradle`): 28 | 29 | ```gradle 30 | allprojects { 31 | repositories { 32 | ... 33 | maven { url "https://jitpack.io" } 34 | } 35 | } 36 | ``` 37 | 38 | ### Manual installation 39 | 40 | #### iOS 41 | 42 | 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` 43 | 2. Go to `node_modules` ➜ `react-native-firebase-ui` and add `RNFirebaseUi.xcodeproj` 44 | 3. In XCode, in the project navigator, select your project. Add `libRNFirebaseUi.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` 45 | 4. Run your project (`Cmd+R`)< 46 | 47 | #### Android 48 | 49 | 1. Open up `android/app/src/main/java/[...]/MainApplication.java` 50 | 51 | - Add `import io.rumors.reactnativefirebaseui.RNFirebaseUiPackage;` to the imports at the top of the file 52 | - Add `new RNFirebaseUiPackage()` to the list returned by the `getPackages()` method 53 | 54 | 2. Append the following lines to `android/settings.gradle`: 55 | 56 | ```gradle 57 | include ':react-native-firebase-ui' 58 | project(':react-native-firebase-ui').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-ui/android') 59 | ``` 60 | 61 | 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: 62 | 63 | ```gradle 64 | compile project(':react-native-firebase-ui') 65 | ``` 66 | 67 | ## Usage 68 | 69 | ```javascript 70 | import { ImageView, PhotoView } from 'react-native-firebaseui'; 71 | 72 | //no zoom support 73 | export class MyFirebaseImageView extends Component { 74 | constructor(props) { 75 | super(props); 76 | } 77 | 78 | render() { 79 | let imageProps = this.props; 80 | 81 | return ( 82 | 89 | ); 90 | } 91 | } 92 | 93 | //zoom support (android only). On iOS just wrap the ImageView with a scroll view 94 | export class MyFirebasePhotoView extends Component { 95 | constructor(props) { 96 | super(props); 97 | } 98 | 99 | render() { 100 | let imageProps = this.props; 101 | 102 | return ( 103 | 110 | ); 111 | } 112 | } 113 | ``` 114 | 115 | > Note: On Android, the `defaultSource` prop is ignored on debug builds. 116 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | def safeExtGet(prop, fallback) { 2 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback 3 | } 4 | 5 | buildscript { 6 | repositories { 7 | jcenter() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:2.2.0' 12 | } 13 | } 14 | 15 | apply plugin: 'com.android.library' 16 | 17 | android { 18 | compileSdkVersion safeExtGet('compileSdkVersion', 26) 19 | buildToolsVersion safeExtGet('buildToolsVersion', "25.0.3") 20 | 21 | defaultConfig { 22 | minSdkVersion safeExtGet('minSdkVersion', 16) 23 | targetSdkVersion safeExtGet('targetSdkVersion', 26) 24 | versionCode 1 25 | versionName "1.0" 26 | } 27 | lintOptions { 28 | abortOnError false 29 | } 30 | } 31 | 32 | repositories { 33 | mavenCentral() 34 | maven { url "https://jitpack.io" } 35 | maven { url 'https://maven.google.com' } 36 | jcenter() 37 | } 38 | 39 | dependencies { 40 | implementation 'com.facebook.react:react-native:+' 41 | 42 | // glide dependencies 43 | implementation 'com.github.bumptech.glide:glide:4.10.0' 44 | annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0' 45 | 46 | // FirebaseUI Storage only 47 | implementation 'com.firebaseui:firebase-ui-storage:3.0.0' 48 | 49 | // PhotoView 50 | implementation 'com.github.chrisbanes:PhotoView:2.1.3' 51 | 52 | // glide-transformations 53 | implementation 'jp.wasabeef:glide-transformations:3.0.1' 54 | } 55 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Sep 02 04:01:57 IDT 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /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 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /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/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/java/io/rumors/reactnativefirebaseui/RNFirebaseUiModule.java: -------------------------------------------------------------------------------- 1 | 2 | package io.rumors.reactnativefirebaseui; 3 | 4 | import com.facebook.react.bridge.ReactApplicationContext; 5 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 6 | import com.facebook.react.bridge.ReactMethod; 7 | import com.facebook.react.bridge.Callback; 8 | 9 | public class RNFirebaseUiModule extends ReactContextBaseJavaModule { 10 | 11 | private final ReactApplicationContext reactContext; 12 | 13 | public RNFirebaseUiModule(ReactApplicationContext reactContext) { 14 | super(reactContext); 15 | this.reactContext = reactContext; 16 | } 17 | 18 | @Override 19 | public String getName() { 20 | return "RNFirebaseUi"; 21 | } 22 | } -------------------------------------------------------------------------------- /android/src/main/java/io/rumors/reactnativefirebaseui/RNFirebaseUiPackage.java: -------------------------------------------------------------------------------- 1 | 2 | package io.rumors.reactnativefirebaseui; 3 | 4 | import java.util.Arrays; 5 | import java.util.Collections; 6 | import java.util.List; 7 | 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.bridge.NativeModule; 10 | import com.facebook.react.bridge.ReactApplicationContext; 11 | import com.facebook.react.uimanager.ViewManager; 12 | import com.facebook.react.bridge.JavaScriptModule; 13 | import io.rumors.reactnativefirebaseui.storage.FirebaseImageViewManager; 14 | import io.rumors.reactnativefirebaseui.storage.FirebasePhotoViewManager; 15 | 16 | public class RNFirebaseUiPackage implements ReactPackage { 17 | @Override 18 | public List createNativeModules(ReactApplicationContext reactContext) { 19 | return Arrays.asList(new RNFirebaseUiModule(reactContext)); 20 | } 21 | 22 | public List> createJSModules() { 23 | return Collections.emptyList(); 24 | } 25 | 26 | @Override 27 | public List createViewManagers(ReactApplicationContext reactContext) { 28 | return Arrays.asList( 29 | new FirebaseImageViewManager(), 30 | new FirebasePhotoViewManager() 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /android/src/main/java/io/rumors/reactnativefirebaseui/storage/ExtendedImageView.java: -------------------------------------------------------------------------------- 1 | package io.rumors.reactnativefirebaseui.storage; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import android.widget.ImageView; 6 | import android.graphics.drawable.Drawable; 7 | 8 | import com.facebook.react.uimanager.ThemedReactContext; 9 | import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper; 10 | import com.google.firebase.storage.StorageReference; 11 | import com.google.firebase.storage.FirebaseStorage; 12 | import com.bumptech.glide.Glide; 13 | import com.bumptech.glide.signature.MediaStoreSignature; 14 | 15 | public class ExtendedImageView extends ImageView { 16 | protected String mPath = null; 17 | protected @Nullable Drawable mDefaultImageDrawable; 18 | protected long mTimestamp = 0; 19 | 20 | protected ThemedReactContext mContext = null; 21 | 22 | public ExtendedImageView(ThemedReactContext context) { 23 | super(context); 24 | mContext = context; 25 | } 26 | 27 | public void setPath(String path) { 28 | mPath = path; 29 | } 30 | 31 | public void setDefaultSource(String name) { 32 | mDefaultImageDrawable = ResourceDrawableIdHelper.getInstance().getResourceDrawable(getContext(), name); 33 | } 34 | 35 | public void setTimestamp(long timestamp) { 36 | mTimestamp = timestamp; 37 | } 38 | 39 | public void updateView() { 40 | StorageReference storageReference = FirebaseStorage.getInstance().getReference(mPath); 41 | GlideApp.with(mContext) 42 | .load(storageReference) 43 | .placeholder(mDefaultImageDrawable) 44 | .dontTransform() 45 | //(String mimeType, long dateModified, int orientation) 46 | .signature(new MediaStoreSignature("", mTimestamp, 0)) 47 | .into(this); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /android/src/main/java/io/rumors/reactnativefirebaseui/storage/ExtendedPhotoView.java: -------------------------------------------------------------------------------- 1 | package io.rumors.reactnativefirebaseui.storage; 2 | 3 | import java.util.Map; 4 | import java.util.Map.Entry; 5 | import java.util.HashMap; 6 | import java.util.ArrayList; 7 | 8 | import javax.annotation.Nullable; 9 | 10 | import com.github.chrisbanes.photoview.PhotoView; 11 | import android.widget.ImageView.ScaleType; 12 | import android.graphics.drawable.Drawable; 13 | 14 | import com.facebook.react.uimanager.ThemedReactContext; 15 | import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper; 16 | import com.firebase.ui.storage.images.FirebaseImageLoader; 17 | import com.google.firebase.storage.StorageReference; 18 | import com.google.firebase.storage.FirebaseStorage; 19 | import com.bumptech.glide.Glide; 20 | import com.bumptech.glide.load.Transformation; 21 | import com.bumptech.glide.load.resource.bitmap.FitCenter; 22 | import com.bumptech.glide.load.resource.bitmap.CenterCrop; 23 | import com.bumptech.glide.load.MultiTransformation; 24 | import com.bumptech.glide.signature.MediaStoreSignature; 25 | import static com.bumptech.glide.request.RequestOptions.bitmapTransform; 26 | 27 | import jp.wasabeef.glide.transformations.RoundedCornersTransformation; 28 | import jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType; 29 | 30 | 31 | public class ExtendedPhotoView extends PhotoView { 32 | protected String mPath = null; 33 | protected @Nullable Drawable mDefaultImageDrawable; 34 | protected Map mBorderRadii = new HashMap(); 35 | protected ScaleType mScaleType; 36 | protected long mTimestamp = 0; 37 | 38 | protected ThemedReactContext mContext = null; 39 | 40 | public ExtendedPhotoView(ThemedReactContext context) { 41 | super(context); 42 | mContext = context; 43 | } 44 | 45 | public void setPath(String path) { 46 | mPath = path; 47 | } 48 | 49 | public void setDefaultSource(String name) { 50 | mDefaultImageDrawable = ResourceDrawableIdHelper.getInstance().getResourceDrawable(getContext(), name); 51 | } 52 | 53 | public void setTimestamp(long timestamp) { 54 | mTimestamp = timestamp; 55 | } 56 | 57 | @Override 58 | public void setScaleType(ScaleType scaleType) { 59 | mScaleType = scaleType; 60 | } 61 | 62 | public void setBorderRadius(int borderRadius, CornerType cornerType) { 63 | mBorderRadii.put(cornerType, borderRadius); 64 | } 65 | 66 | public void updateView() { 67 | StorageReference storageReference = FirebaseStorage.getInstance().getReference(mPath); 68 | 69 | ArrayList transformations = new ArrayList(1 + mBorderRadii.size()); 70 | 71 | if (mScaleType == ScaleType.CENTER_CROP) { 72 | transformations.add(new CenterCrop()); 73 | } else { 74 | transformations.add(new FitCenter()); 75 | } 76 | 77 | for (Entry entry : mBorderRadii.entrySet()) { 78 | CornerType cornerType = entry.getKey(); 79 | Integer radius = entry.getValue(); 80 | transformations.add(new RoundedCornersTransformation(radius, 0, cornerType)); 81 | } 82 | 83 | 84 | Transformation[] transformationsArray = transformations.toArray(new Transformation[transformations.size()]); 85 | MultiTransformation multi = new MultiTransformation<>(transformationsArray); 86 | 87 | GlideApp.with(mContext) 88 | .load(storageReference) 89 | .placeholder(mDefaultImageDrawable) 90 | .apply(bitmapTransform(multi)) 91 | //(String mimeType, long dateModified, int orientation) 92 | .signature(new MediaStoreSignature("", mTimestamp, 0)) 93 | .into(this); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /android/src/main/java/io/rumors/reactnativefirebaseui/storage/FirebaseImageViewManager.java: -------------------------------------------------------------------------------- 1 | package io.rumors.reactnativefirebaseui.storage; 2 | 3 | import javax.annotation.Nullable; 4 | import android.widget.ImageView.ScaleType; 5 | 6 | import com.facebook.react.uimanager.ViewProps; 7 | import com.facebook.react.uimanager.annotations.ReactProp; 8 | import com.facebook.react.uimanager.SimpleViewManager; 9 | import com.facebook.react.uimanager.ThemedReactContext; 10 | 11 | public class FirebaseImageViewManager extends SimpleViewManager { 12 | public static final String REACT_CLASS = "RCTFirebaseImageView"; 13 | 14 | @Override 15 | public String getName() { 16 | return REACT_CLASS; 17 | } 18 | 19 | @Override 20 | public ExtendedImageView createViewInstance(ThemedReactContext context) { 21 | return new ExtendedImageView(context); 22 | } 23 | 24 | @ReactProp(name = "path") 25 | public void setPath(ExtendedImageView imageView, @Nullable String path) { 26 | imageView.setPath(path); 27 | } 28 | 29 | @ReactProp(name = "defaultSource") 30 | public void setDefaultSource(ExtendedImageView imageView, @Nullable String source) { 31 | imageView.setDefaultSource(source); 32 | } 33 | 34 | @ReactProp(name = "timestamp") 35 | public void setTimestamp(ExtendedImageView imageView, @Nullable double timestamp) { 36 | imageView.setTimestamp((long)timestamp); 37 | } 38 | 39 | @ReactProp(name = ViewProps.RESIZE_MODE) 40 | public void setResizeMode(ExtendedImageView imageView, @Nullable String resizeMode) { 41 | ScaleType scaleType = ScaleType.CENTER_INSIDE; 42 | if ("cover".equals(resizeMode)) { 43 | scaleType = ScaleType.CENTER_CROP; 44 | } else if ("contain".equals(resizeMode)) { 45 | scaleType = ScaleType.CENTER_INSIDE; 46 | } else if ("stretch".equals(resizeMode)) { 47 | scaleType = ScaleType.FIT_XY; 48 | } else if ("center".equals(resizeMode)) { 49 | scaleType = ScaleType.CENTER; 50 | } 51 | imageView.setScaleType(scaleType); 52 | } 53 | 54 | @Override 55 | protected void onAfterUpdateTransaction(ExtendedImageView imageView) { 56 | super.onAfterUpdateTransaction(imageView); 57 | imageView.updateView(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /android/src/main/java/io/rumors/reactnativefirebaseui/storage/FirebasePhotoViewManager.java: -------------------------------------------------------------------------------- 1 | package io.rumors.reactnativefirebaseui.storage; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import android.widget.ImageView.ScaleType; 6 | 7 | import jp.wasabeef.glide.transformations.RoundedCornersTransformation; 8 | 9 | import com.facebook.react.uimanager.ViewProps; 10 | import com.facebook.react.uimanager.annotations.ReactProp; 11 | import com.facebook.react.uimanager.annotations.ReactPropGroup; 12 | 13 | import com.facebook.react.uimanager.SimpleViewManager; 14 | import com.facebook.react.uimanager.ThemedReactContext; 15 | import com.facebook.yoga.YogaConstants; 16 | import com.facebook.react.uimanager.PixelUtil; 17 | 18 | public class FirebasePhotoViewManager extends SimpleViewManager { 19 | public static final String REACT_CLASS = "RCTFirebasePhotoView"; 20 | 21 | @Override 22 | public String getName() { 23 | return REACT_CLASS; 24 | } 25 | 26 | @Override 27 | public ExtendedPhotoView createViewInstance(ThemedReactContext context) { 28 | return new ExtendedPhotoView(context); 29 | } 30 | 31 | @ReactProp(name = "path") 32 | public void setPath(ExtendedPhotoView imageView, @Nullable String path) { 33 | imageView.setPath(path); 34 | } 35 | 36 | @ReactProp(name = "defaultSource") 37 | public void setDefaultSource(ExtendedPhotoView imageView, @Nullable String source) { 38 | imageView.setDefaultSource(source); 39 | } 40 | 41 | @ReactProp(name = "timestamp") 42 | public void setTimestamp(ExtendedPhotoView imageView, @Nullable double timestamp) { 43 | imageView.setTimestamp((long)timestamp); 44 | } 45 | 46 | @ReactProp(name = ViewProps.RESIZE_MODE) 47 | public void setResizeMode(ExtendedPhotoView imageView, @Nullable String resizeMode) { 48 | ScaleType scaleType = ScaleType.CENTER_INSIDE; 49 | if ("cover".equals(resizeMode)) { 50 | scaleType = ScaleType.CENTER_CROP; 51 | } else if ("contain".equals(resizeMode)) { 52 | scaleType = ScaleType.CENTER_INSIDE; 53 | } else if ("stretch".equals(resizeMode)) { 54 | scaleType = ScaleType.FIT_XY; 55 | } else if ("center".equals(resizeMode)) { 56 | scaleType = ScaleType.CENTER; 57 | } 58 | imageView.setScaleType(scaleType); 59 | } 60 | 61 | @ReactPropGroup(names = { 62 | ViewProps.BORDER_RADIUS, 63 | ViewProps.BORDER_TOP_LEFT_RADIUS, 64 | ViewProps.BORDER_TOP_RIGHT_RADIUS, 65 | ViewProps.BORDER_BOTTOM_RIGHT_RADIUS, 66 | ViewProps.BORDER_BOTTOM_LEFT_RADIUS 67 | }, defaultFloat = YogaConstants.UNDEFINED) 68 | public void setBorderRadius(ExtendedPhotoView imageView, int index, float borderRadius) { 69 | if (!YogaConstants.isUndefined(borderRadius)) { 70 | borderRadius = PixelUtil.toPixelFromDIP(borderRadius); 71 | } 72 | 73 | RoundedCornersTransformation.CornerType cornerType = RoundedCornersTransformation.CornerType.ALL; 74 | switch (index) { 75 | case 0: 76 | cornerType = RoundedCornersTransformation.CornerType.ALL; 77 | break; 78 | case 1: 79 | cornerType = RoundedCornersTransformation.CornerType.TOP_LEFT; 80 | break; 81 | case 2: 82 | cornerType = RoundedCornersTransformation.CornerType.TOP_RIGHT; 83 | break; 84 | case 3: 85 | cornerType = RoundedCornersTransformation.CornerType.BOTTOM_RIGHT; 86 | break; 87 | case 4: 88 | cornerType = RoundedCornersTransformation.CornerType.BOTTOM_LEFT; 89 | break; 90 | } 91 | 92 | imageView.setBorderRadius(Math.round(borderRadius), cornerType); 93 | } 94 | 95 | @Override 96 | protected void onAfterUpdateTransaction(ExtendedPhotoView imageView) { 97 | super.onAfterUpdateTransaction(imageView); 98 | imageView.updateView(); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /android/src/main/java/io/rumors/reactnativefirebaseui/storage/ImageLoaderGlideModule.java: -------------------------------------------------------------------------------- 1 | package io.rumors.reactnativefirebaseui.storage; 2 | 3 | import android.content.Context; 4 | import com.bumptech.glide.Glide; 5 | import com.bumptech.glide.Registry; 6 | import com.bumptech.glide.annotation.GlideModule; 7 | import com.bumptech.glide.module.AppGlideModule; 8 | 9 | import com.firebase.ui.storage.images.FirebaseImageLoader; 10 | import com.google.firebase.storage.StorageReference; 11 | 12 | import java.io.InputStream; 13 | 14 | 15 | @GlideModule 16 | public class ImageLoaderGlideModule extends AppGlideModule { 17 | @Override 18 | public void registerComponents(Context context, Glide glide, Registry registry) { 19 | // Register FirebaseImageLoader to handle StorageReference 20 | registry.append(StorageReference.class, InputStream.class, 21 | new FirebaseImageLoader.Factory()); 22 | } 23 | } -------------------------------------------------------------------------------- /example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /example/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; These should not be required directly 12 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 13 | node_modules/warning/.* 14 | 15 | ; Flow doesn't support platforms 16 | .*/Libraries/Utilities/LoadingView.js 17 | 18 | [untyped] 19 | .*/node_modules/@react-native-community/cli/.*/.* 20 | 21 | [include] 22 | 23 | [libs] 24 | node_modules/react-native/Libraries/react-native/react-native-interface.js 25 | node_modules/react-native/flow/ 26 | 27 | [options] 28 | emoji=true 29 | 30 | esproposal.optional_chaining=enable 31 | esproposal.nullish_coalescing=enable 32 | 33 | module.file_ext=.js 34 | module.file_ext=.json 35 | module.file_ext=.ios.js 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation' 40 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 41 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 42 | 43 | suppress_type=$FlowIssue 44 | suppress_type=$FlowFixMe 45 | suppress_type=$FlowFixMeProps 46 | suppress_type=$FlowFixMeState 47 | 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 50 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 51 | 52 | [lints] 53 | sketchy-null-number=warn 54 | sketchy-null-mixed=warn 55 | sketchy-number=warn 56 | untyped-type-import=warn 57 | nonstrict-import=warn 58 | deprecated-type=warn 59 | unsafe-getters-setters=warn 60 | inexact-spread=warn 61 | unnecessary-invariant=warn 62 | signature-verification-failure=warn 63 | deprecated-utility=error 64 | 65 | [strict] 66 | deprecated-type 67 | nonstrict-import 68 | sketchy-null 69 | unclear-type 70 | unsafe-getters-setters 71 | untyped-import 72 | untyped-type-import 73 | 74 | [version] 75 | ^0.105.0 76 | -------------------------------------------------------------------------------- /example/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /example/.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 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.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 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | 61 | GoogleService-Info.plist 62 | google-services.json -------------------------------------------------------------------------------- /example/.opensource/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "React Native Firebase Starter", 3 | "type": "sample", 4 | "platforms": ["Android", "iOS"], 5 | "content": "README.md", 6 | "related": ["invertase/react-native-firebase"] 7 | } 8 | -------------------------------------------------------------------------------- /example/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/App.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import React, {Component} from 'react'; 6 | import {StyleSheet, View} from 'react-native'; 7 | import {ImageView, PhotoView} from 'react-native-firebaseui'; 8 | 9 | //no zoom support 10 | class MyFirebaseImageView extends Component { 11 | render() { 12 | let imageProps = this.props; 13 | 14 | return ( 15 | 22 | ); 23 | } 24 | } 25 | 26 | //zoom support (android only). On iOS just wrap the ImageView with a scroll view 27 | class MyFirebasePhotoView extends Component { 28 | render() { 29 | let imageProps = this.props; 30 | 31 | return ( 32 | 39 | ); 40 | } 41 | } 42 | 43 | export default class App extends Component { 44 | render() { 45 | return ( 46 | 47 | 48 | 49 | 50 | ); 51 | } 52 | } 53 | 54 | const styles = StyleSheet.create({ 55 | container: { 56 | flex: 1, 57 | justifyContent: 'center', 58 | alignItems: 'center', 59 | backgroundColor: 'black', 60 | }, 61 | image: { 62 | width: 100, 63 | height: 100, 64 | borderRadius: 10, 65 | }, 66 | }); 67 | -------------------------------------------------------------------------------- /example/App.test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from './App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /example/LICENSE: -------------------------------------------------------------------------------- 1 | Apache-2.0 License 2 | ------------------ 3 | 4 | Copyright (c) 2016-present Invertase Limited 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this library except in compliance with the License. 8 | 9 | You may obtain a copy of the Apache-2.0 License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | 19 | 20 | Creative Commons Attribution 3.0 License 21 | ---------------------------------------- 22 | 23 | Copyright (c) 2016-present Invertase Limited 24 | 25 | Documentation and other instructional materials provided for this project 26 | (including on a separate documentation repository or it's documentation website) are 27 | licensed under the Creative Commons Attribution 3.0 License. Code samples/blocks 28 | contained therein are licensed under the Apache License, Version 2.0 (the "License"), as above. 29 | 30 | You may obtain a copy of the Creative Commons Attribution 3.0 License at 31 | 32 | https://creativecommons.org/licenses/by/3.0/ 33 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | ## React Native Firebase Starter 2 | 3 | [![Backers on Open Collective](https://opencollective.com/react-native-firebase/backers/badge.svg)](#backers) 4 | [![Sponsors on Open Collective](https://opencollective.com/react-native-firebase/sponsors/badge.svg)](#sponsors) 5 | [![npm version](https://img.shields.io/npm/v/react-native-firebase.svg?style=flat-square)](https://www.npmjs.com/package/react-native-firebase) 6 | [![NPM downloads](https://img.shields.io/npm/dm/react-native-firebase.svg?style=flat-square)](https://www.npmjs.com/package/react-native-firebase) 7 | [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=flat-square)](https://discord.gg/C9aK28N) 8 | [![Twitter Follow](https://img.shields.io/twitter/follow/rnfirebase.svg?style=social&label=Follow)](https://twitter.com/rnfirebase) 9 | 10 | --- 11 | 12 | A basic react native app with [`react-native-firebase`](https://github.com/invertase/react-native-firebase) pre-integrated to get you started quickly. 13 | 14 | --- 15 | 16 | > **DEPRECATED**: This is for RNFB v5 only. For v6 onwards please follow the [new projects guide](https://invertase.io/oss/react-native-firebase/quick-start/new-project). 17 | 18 | 19 | ### Getting Started 20 | 21 | > If you're only developing for one platform you can ignore the steps below that are tagged with the platform you don't require. 22 | 23 | #### 1) Clone & Install Dependencies 24 | 25 | - 1.1) `git clone https://github.com/invertase/react-native-firebase-starter.git` 26 | - 1.2) `cd react-native-firebase-starter` - cd into your newly created project directory. 27 | - 1.3) Install NPM packages with your package manager of choice - i.e run `yarn` or `npm install` 28 | 29 | #### 2) Rename Project 30 | 31 | **You will need to be running Node version 7.6 or greater for the rename functionality to work** 32 | 33 | - 2.1) `npm run rename` - you'll be prompted to enter a project name and company name 34 | - 2.2) Note down the package name value - you'll need this when setting up your Firebase project 35 | 36 | #### 3) **[iOS]** Install Pods `RN < 0.60.0` 37 | 38 | - 3.1) `cd ios` and run `pod install` - if you don't have CocoaPods you can follow [these instructions](https://guides.cocoapods.org/using/getting-started.html#getting-started) to install it. 39 | 40 | #### 4) Add `Google Services` files (plist & JSON) 41 | 42 | - 4.1) **[iOS]** Follow the `add firebase to your app` instructions [here](https://firebase.google.com/docs/ios/setup#add_firebase_to_your_app) to generate your `GoogleService-Info.plist` file if you haven't done so already - use the package name generated previously as your `iOS bundle ID`. 43 | - 4.2) **[iOS]** Place this file in the `ios/` directory of your project. 44 | - Once added to the directory, add the file to your Xcode project using 'File > Add Files to "[YOUR APP NAME]"…' and selecting the plist file. 45 | - 4.3) **[Android]** Follow the `manually add firebase` to your app instructions [here](https://firebase.google.com/docs/android/setup#manually_add_firebase) to generate your `google-services.json` file if you haven't done so already - use the package name generated previously as your `Android package name`. 46 | - 4.4) **[Android]** Place this file in the `android/app/` directory of your project. 47 | 48 | #### 5) AdMob Setup (Or Removal) 49 | 50 | - 5.1) React Native Firebase Starter kit comes with AdMob pre-install. The default Sample AdMob App ID is used in both the `info.plist` **[iOS]** and the `AndroidManifest.xml` **[Android]** files. If you don't want to use AdMob, just remove it. If you do, be sure to update your ID! 51 | - 5.2) **[iOS]** Remove or change in `info.plist` by editing the `GADApplicationIdentifier` key string. 52 | - 5.3) **[Android]** Remove or change in `AndroidManifest.xml` by modifying the content of `` tag within the `` tag. 53 | - 5.4) More instrucation can be found [here](https://developers.google.com/admob/android/quick-start). 54 | 55 | #### 6) Start your app 56 | 57 | - 6.1) Start the react native packager, run `yarn run start` or `npm start` from the root of your project. 58 | - 6.2) **[iOS]** Build and run the iOS app, run `npm run ios` or `yarn run ios` from the root of your project. The first build will take some time. This will automatically start up a simulator also for you on a successful build if one wasn't already started. 59 | - 6.3) **[Android]** If you haven't already got an android device attached/emulator running then you'll need to get one running (make sure the emulator is with Google Play / APIs). When ready run `npm run android` or `yarn run android` from the root of your project. 60 | 61 | If all has gone well you'll see an initial screen like the one below. 62 | 63 | ## Screenshots 64 | 65 | ![preview](https://i.imgur.com/4lG4HuS.png) 66 | 67 | 68 | ## Contributors 69 | 70 | This project exists thanks to all the people who contribute. [[Contribute]](https://github.com/invertase/react-native-firebase/blob/master/CONTRIBUTING.md). 71 | 72 | 73 | 74 | ## Backers 75 | 76 | Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/react-native-firebase#backer)] 77 | 78 | 79 | 80 | 81 | ## Sponsors 82 | 83 | Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/react-native-firebase#sponsor)] 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | ### License 99 | 100 | - See [LICENSE](/LICENSE) 101 | -------------------------------------------------------------------------------- /example/android/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /example/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 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.rnfirebasestarter", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.rnfirebasestarter", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | apply plugin: "com.google.firebase.firebase-perf" 3 | apply plugin: 'io.fabric' 4 | 5 | import com.android.build.OutputFile 6 | 7 | /** 8 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 9 | * and bundleReleaseJsAndAssets). 10 | * These basically call `react-native bundle` with the correct arguments during the Android build 11 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 12 | * bundle directly from the development server. Below you can see all the possible configurations 13 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 14 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 15 | * 16 | * project.ext.react = [ 17 | * // the name of the generated asset file containing your JS bundle 18 | * bundleAssetName: "index.android.bundle", 19 | * 20 | * // the entry file for bundle generation 21 | * entryFile: "index.android.js", 22 | * 23 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format 24 | * bundleCommand: "ram-bundle", 25 | * 26 | * // whether to bundle JS and assets in debug mode 27 | * bundleInDebug: false, 28 | * 29 | * // whether to bundle JS and assets in release mode 30 | * bundleInRelease: true, 31 | * 32 | * // whether to bundle JS and assets in another build variant (if configured). 33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 34 | * // The configuration property can be in the following formats 35 | * // 'bundleIn${productFlavor}${buildType}' 36 | * // 'bundleIn${buildType}' 37 | * // bundleInFreeDebug: true, 38 | * // bundleInPaidRelease: true, 39 | * // bundleInBeta: true, 40 | * 41 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 42 | * // for example: to disable dev mode in the staging build type (if configured) 43 | * devDisabledInStaging: true, 44 | * // The configuration property can be in the following formats 45 | * // 'devDisabledIn${productFlavor}${buildType}' 46 | * // 'devDisabledIn${buildType}' 47 | * 48 | * // the root of your project, i.e. where "package.json" lives 49 | * root: "../../", 50 | * 51 | * // where to put the JS bundle asset in debug mode 52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 53 | * 54 | * // where to put the JS bundle asset in release mode 55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 56 | * 57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 58 | * // require('./image.png')), in debug mode 59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 60 | * 61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 62 | * // require('./image.png')), in release mode 63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 64 | * 65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 69 | * // for example, you might want to remove it from here. 70 | * inputExcludes: ["android/**", "ios/**"], 71 | * 72 | * // override which node gets called and with what additional arguments 73 | * nodeExecutableAndArgs: ["node"], 74 | * 75 | * // supply additional arguments to the packager 76 | * extraPackagerArgs: [] 77 | * ] 78 | */ 79 | 80 | project.ext.react = [ 81 | entryFile: "index.js", 82 | enableHermes: false, // clean and rebuild if changing 83 | 84 | // Sometimes (like if you use Android API<17) adb forwards don't work, so you need a bundle in the dev APK 85 | bundleInDebug: project.hasProperty("bundleInDebug") ? project.getProperty("bundleInDebug") : false, 86 | ] 87 | 88 | apply from: "../../node_modules/react-native/react.gradle" 89 | 90 | /** 91 | * Set this to true to create two separate APKs instead of one: 92 | * - An APK that only works on ARM devices 93 | * - An APK that only works on x86 devices 94 | * The advantage is the size of the APK is reduced by about 4MB. 95 | * Upload all the APKs to the Play Store and people will download 96 | * the correct one based on the CPU architecture of their device. 97 | */ 98 | def enableSeparateBuildPerCPUArchitecture = false 99 | 100 | /** 101 | * Run Proguard to shrink the Java bytecode in release builds. 102 | */ 103 | def enableProguardInReleaseBuilds = false 104 | 105 | /** 106 | * The preferred build flavor of JavaScriptCore. 107 | * 108 | * For example, to use the international variant, you can use: 109 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 110 | * 111 | * The international variant includes ICU i18n library and necessary data 112 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 113 | * give correct results when using with locales other than en-US. Note that 114 | * this variant is about 6MiB larger per architecture than default. 115 | */ 116 | def jscFlavor = 'org.webkit:android-jsc:+' 117 | 118 | /** 119 | * Whether to enable the Hermes VM. 120 | * 121 | * This should be set on project.ext.react and mirrored here. If it is not set 122 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 123 | * and the benefits of using Hermes will therefore be sharply reduced. 124 | */ 125 | def enableHermes = project.ext.react.get("enableHermes", false); 126 | 127 | android { 128 | compileSdkVersion rootProject.ext.compileSdkVersion 129 | 130 | compileOptions { 131 | sourceCompatibility JavaVersion.VERSION_1_8 132 | targetCompatibility JavaVersion.VERSION_1_8 133 | } 134 | 135 | defaultConfig { 136 | applicationId "com.rmrs.reactnativefirebaseuiexample" 137 | minSdkVersion rootProject.ext.minSdkVersion 138 | targetSdkVersion rootProject.ext.targetSdkVersion 139 | versionCode 1 140 | versionName "1.0" 141 | 142 | // Needed to support API<21, though there is a small chance proguard shrinks things sufficiently 143 | multiDexEnabled true 144 | } 145 | signingConfigs { 146 | debug { 147 | storeFile file('debug.keystore') 148 | storePassword 'android' 149 | keyAlias 'androiddebugkey' 150 | keyPassword 'android' 151 | } 152 | } 153 | splits { 154 | abi { 155 | reset() 156 | enable enableSeparateBuildPerCPUArchitecture 157 | universalApk false // If true, also generate a universal APK 158 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 159 | } 160 | } 161 | buildTypes { 162 | debug { 163 | signingConfig signingConfigs.debug 164 | } 165 | release { 166 | // Caution! In production, you need to generate your own keystore file. 167 | // see https://facebook.github.io/react-native/docs/signed-apk-android. 168 | signingConfig signingConfigs.debug 169 | minifyEnabled enableProguardInReleaseBuilds 170 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 171 | } 172 | } 173 | // applicationVariants are e.g. debug, release 174 | applicationVariants.all { variant -> 175 | variant.outputs.each { output -> 176 | // For each separate APK per architecture, set a unique version code as described here: 177 | // https://developer.android.com/studio/build/configure-apk-splits.html 178 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 179 | def abi = output.getFilter(OutputFile.ABI) 180 | if (abi != null) { // null for the universal-debug, universal-release variants 181 | output.versionCodeOverride = 182 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 183 | } 184 | } 185 | } 186 | } 187 | 188 | dependencies { 189 | implementation fileTree(dir: "libs", include: ["*.jar"]) 190 | implementation "com.facebook.react:react-native:+" // From node_modules 191 | 192 | /* ---------------------------- 193 | * REACT NATIVE FIREBASE 194 | * ---------------------------- */ 195 | 196 | // Firebase bom setup 197 | implementation platform("com.google.firebase:firebase-bom:22.2.0") 198 | 199 | // Required dependencies 200 | //noinspection GradleCompatible 201 | implementation "com.google.firebase:firebase-core" 202 | 203 | /* ------------------------- 204 | * OPTIONAL FIREBASE SDKS 205 | * ------------------------- */ 206 | 207 | implementation('com.google.firebase:firebase-ads') { 208 | // exclude `customtabs` as the support lib version is out of date 209 | // we manually add it as a dependency below with a custom version 210 | exclude group: 'com.android.support', module: 'customtabs' 211 | } 212 | 213 | // Authentication 214 | implementation "com.google.firebase:firebase-auth" 215 | // Analytics 216 | implementation "com.google.firebase:firebase-analytics" 217 | // Performance Monitoring 218 | implementation "com.google.firebase:firebase-perf" 219 | // Remote Config 220 | implementation "com.google.firebase:firebase-config" 221 | // Cloud Storage 222 | implementation "com.google.firebase:firebase-storage" 223 | // Dynamic Links 224 | implementation "com.google.firebase:firebase-dynamic-links" 225 | // Real-time Database 226 | implementation "com.google.firebase:firebase-database" 227 | // Cloud Functions 228 | implementation "com.google.firebase:firebase-functions" 229 | // Cloud Firestore 230 | implementation "com.google.firebase:firebase-firestore" 231 | // Cloud Messaging / FCM 232 | implementation "com.google.firebase:firebase-messaging" 233 | // Crashlytics 234 | implementation('com.crashlytics.sdk.android:crashlytics@aar') { 235 | transitive = true 236 | } 237 | 238 | /* -------------------------------- 239 | * OPTIONAL SUPPORT LIBS 240 | * -------------------------------- */ 241 | 242 | // Needed to support API<21, though there is a small chance proguard shrinks things sufficiently 243 | implementation "androidx.multidex:multidex:2.0.1" 244 | 245 | // For Firebase Ads 246 | //noinspection GradleCompatible 247 | implementation "com.android.support:customtabs:28.0.0" 248 | 249 | // For React Native Firebase Notifications 250 | implementation 'me.leolin:ShortcutBadger:1.1.22@aar' 251 | 252 | if (enableHermes) { 253 | def hermesPath = "../../node_modules/hermes-engine/android/"; 254 | debugImplementation files(hermesPath + "hermes-debug.aar") 255 | releaseImplementation files(hermesPath + "hermes-release.aar") 256 | } else { 257 | implementation jscFlavor 258 | } 259 | } 260 | 261 | // Run this once to be able to run the application with BUCK 262 | // puts all compile dependencies into folder libs for BUCK to use 263 | task copyDownloadableDepsToLibs(type: Copy) { 264 | from configurations.compile 265 | into 'libs' 266 | } 267 | 268 | apply plugin: 'com.google.gms.google-services' 269 | 270 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 271 | -------------------------------------------------------------------------------- /example/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 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 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 16 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/rmrs/reactnativefirebaseuiexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.rmrs.reactnativefirebaseuiexample; 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 "ReactNativeFirebaseUIExample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/rmrs/reactnativefirebaseuiexample/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.rmrs.reactnativefirebaseuiexample; 2 | 3 | import androidx.multidex.MultiDexApplication; 4 | 5 | import android.util.Log; 6 | import com.facebook.react.PackageList; 7 | import com.facebook.hermes.reactexecutor.HermesExecutorFactory; 8 | import com.facebook.react.bridge.JavaScriptExecutorFactory; 9 | 10 | import com.facebook.react.ReactApplication; 11 | import com.facebook.react.ReactNativeHost; 12 | import com.facebook.react.ReactPackage; 13 | import com.facebook.soloader.SoLoader; 14 | 15 | // optional packages - add/remove as appropriate 16 | import io.invertase.firebase.admob.RNFirebaseAdMobPackage; 17 | import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage; 18 | import io.invertase.firebase.auth.RNFirebaseAuthPackage; 19 | import io.invertase.firebase.config.RNFirebaseRemoteConfigPackage; 20 | import io.invertase.firebase.database.RNFirebaseDatabasePackage; 21 | import io.invertase.firebase.fabric.crashlytics.RNFirebaseCrashlyticsPackage; 22 | import io.invertase.firebase.firestore.RNFirebaseFirestorePackage; 23 | import io.invertase.firebase.functions.RNFirebaseFunctionsPackage; 24 | import io.invertase.firebase.instanceid.RNFirebaseInstanceIdPackage; 25 | import io.invertase.firebase.links.RNFirebaseLinksPackage; 26 | import io.invertase.firebase.messaging.RNFirebaseMessagingPackage; 27 | import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage; 28 | import io.invertase.firebase.perf.RNFirebasePerformancePackage; 29 | import io.invertase.firebase.storage.RNFirebaseStoragePackage; 30 | 31 | import java.util.List; 32 | 33 | public class MainApplication extends MultiDexApplication implements ReactApplication { 34 | 35 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 36 | @Override 37 | public boolean getUseDeveloperSupport() { 38 | return BuildConfig.DEBUG; 39 | } 40 | 41 | @Override 42 | protected List getPackages() { 43 | @SuppressWarnings("UnnecessaryLocalVariable") 44 | List packages = new PackageList(this).getPackages(); 45 | // Packages that cannot be autolinked yet can be added manually here, for example: 46 | // add/remove these packages as appropriate 47 | packages.add(new RNFirebaseAdMobPackage()); 48 | packages.add(new RNFirebaseAnalyticsPackage()); 49 | packages.add(new RNFirebaseAuthPackage()); 50 | packages.add(new RNFirebaseRemoteConfigPackage()); 51 | packages.add(new RNFirebaseCrashlyticsPackage()); 52 | packages.add(new RNFirebaseDatabasePackage()); 53 | packages.add(new RNFirebaseFirestorePackage()); 54 | packages.add(new RNFirebaseFunctionsPackage()); 55 | packages.add(new RNFirebaseInstanceIdPackage()); 56 | packages.add(new RNFirebaseLinksPackage()); 57 | packages.add(new RNFirebaseMessagingPackage()); 58 | packages.add(new RNFirebaseNotificationsPackage()); 59 | packages.add(new RNFirebasePerformancePackage()); 60 | packages.add(new RNFirebaseStoragePackage()); 61 | return packages; 62 | } 63 | 64 | @Override 65 | protected String getJSMainModuleName() { 66 | return "index"; 67 | } 68 | }; 69 | 70 | @Override 71 | public ReactNativeHost getReactNativeHost() { 72 | return mReactNativeHost; 73 | } 74 | 75 | @Override 76 | public void onCreate() { 77 | super.onCreate(); 78 | SoLoader.init(this, /* native exopackage */ false); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReactNativeFirebaseUIExample 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/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 = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | maven { 14 | url 'https://maven.fabric.io/public' 15 | } 16 | } 17 | dependencies { 18 | classpath('com.android.tools.build:gradle:3.5.0') 19 | classpath 'com.google.gms:google-services:4.3.2' 20 | classpath 'com.google.firebase:perf-plugin:1.3.1' 21 | classpath 'io.fabric.tools:gradle:1.31.0' 22 | // NOTE: Do not place your application dependencies here; they belong 23 | // in the individual module build.gradle files 24 | } 25 | } 26 | 27 | allprojects { 28 | repositories { 29 | mavenLocal() 30 | maven { 31 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 32 | url("$rootDir/../node_modules/react-native/android") 33 | } 34 | maven { 35 | // Android JSC is installed from npm 36 | url("$rootDir/../node_modules/jsc-android/dist") 37 | } 38 | google() 39 | jcenter() 40 | maven { url "https://jitpack.io" } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /example/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=768m -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.useAndroidX=true 21 | android.enableJetifier=true 22 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin, switch paths to Windows format before running java 129 | if $cygwin ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=$((i+1)) 158 | done 159 | case $i in 160 | (0) set -- ;; 161 | (1) set -- "$args0" ;; 162 | (2) set -- "$args0" "$args1" ;; 163 | (3) set -- "$args0" "$args1" "$args2" ;; 164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=$(save "$@") 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 185 | cd "$(dirname "$0")" 186 | fi 187 | 188 | exec "$JAVACMD" "$@" 189 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 83 | 84 | @rem Execute Gradle 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /example/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactNativeFirebaseUIExample' 2 | include ':react-native-firebase' 3 | project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android') 4 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 5 | include ':app' 6 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativeFirebaseUIExample", 3 | "displayName": "ReactNativeFirebaseUIExample" 4 | } -------------------------------------------------------------------------------- /example/assets/ReactNativeFirebase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/assets/ReactNativeFirebase.png -------------------------------------------------------------------------------- /example/assets/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmrs/react-native-firebaseui/6cf9ae6389a78a89e65e47d90f04b1d747963534/example/assets/placeholder.png -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/bin/rename.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | const readline = require('readline'); 3 | const replace = require('replace-in-file'); 4 | 5 | const BASE_DIRECTORY = './'; 6 | const DEFAULT_COMPANY_NAME = 'invertase'; 7 | const DEFAULT_PACKAGE_NAME = 'com.invertase.rnfirebasestarter'; 8 | const DEFAULT_PROJECT_NAME = 'RNFirebaseStarter'; 9 | const VALID_CHARACTERS = /^[a-zA-Z\s]+$/; 10 | 11 | const rl = readline.createInterface({ 12 | input: process.stdin, 13 | output: process.stdout 14 | }); 15 | 16 | const readInput = (input) => { 17 | return new Promise((resolve, reject) => { 18 | rl.question(`Enter your ${input}: `, (answer) => { 19 | resolve(answer); 20 | }) 21 | }) 22 | }; 23 | 24 | const replaceInFile = (from, to) => { 25 | return new Promise((resolve, reject) => { 26 | const options = { 27 | files: [ 28 | './android/**', 29 | './ios/**', 30 | './*', 31 | ], 32 | from: new RegExp(from, 'g'), 33 | to: to 34 | }; 35 | replace(options) 36 | .then(changedFiles => { 37 | if (changedFiles) { 38 | console.log('[replaceInFile] Modified files: \n', changedFiles.join('\n')); 39 | } 40 | resolve(); 41 | }) 42 | .catch(error => { 43 | console.error('[replaceInFile] Error occurred: ', error); 44 | reject(error); 45 | }) 46 | }) 47 | }; 48 | 49 | const renameFiles = (dir, from, to) => { 50 | const files = fs.readdirSync(dir); 51 | for (let i = 0; i < files.length; i += 1) { 52 | const filename = files[i]; 53 | const path = dir + '/' + filename; 54 | const file = fs.statSync(path); 55 | let newPath; 56 | if (filename.indexOf(from) !== -1) { 57 | newPath = dir + '/' + filename.replace(from, to); 58 | fs.renameSync(path, newPath); 59 | console.log(`[renameFiles] Renamed: ${path} to: ${newPath}`); 60 | } 61 | // Recursive 62 | if (file.isDirectory()) { 63 | renameFiles(newPath || path, from, to); 64 | } 65 | } 66 | }; 67 | 68 | const updateProjectName = (name) => { 69 | console.log('---------------------------------------'); 70 | console.log(`Updating project name: ${name}`); 71 | console.log('---------------------------------------'); 72 | return replaceInFile(DEFAULT_PROJECT_NAME, name) 73 | .then(() => { 74 | console.log('---------------------------------------'); 75 | console.log('Finished updating project name'); 76 | console.log('---------------------------------------'); 77 | console.log(); 78 | }); 79 | }; 80 | 81 | const updatePackageName = (packageName) => { 82 | console.log('---------------------------------------'); 83 | console.log(`Updating package name: ${packageName}`); 84 | console.log('---------------------------------------'); 85 | return replaceInFile(DEFAULT_PACKAGE_NAME, packageName) 86 | .then(() => { 87 | console.log('---------------------------------------'); 88 | console.log('Finished updating package name'); 89 | console.log('---------------------------------------'); 90 | console.log(); 91 | }); 92 | ; 93 | }; 94 | 95 | const renameProjectFiles = (name) => { 96 | console.log('---------------------------------------'); 97 | console.log(`Rename project files`); 98 | console.log('---------------------------------------'); 99 | return new Promise((resolve, reject) => { 100 | renameFiles(BASE_DIRECTORY, DEFAULT_PROJECT_NAME, name); 101 | renameFiles(BASE_DIRECTORY, DEFAULT_PROJECT_NAME.toLowerCase(), name.toLowerCase()); 102 | console.log('---------------------------------------'); 103 | console.log('Finished renaming project files'); 104 | console.log('---------------------------------------'); 105 | console.log(); 106 | resolve(); 107 | }) 108 | }; 109 | 110 | const renameCompanyFiles = (name) => { 111 | console.log('---------------------------------------'); 112 | console.log(`Rename company files`); 113 | console.log('---------------------------------------'); 114 | return new Promise((resolve, reject) => { 115 | renameFiles(BASE_DIRECTORY, DEFAULT_COMPANY_NAME, name); 116 | console.log('---------------------------------------'); 117 | console.log('Finished renaming company files'); 118 | console.log('---------------------------------------'); 119 | console.log(); 120 | resolve(); 121 | }) 122 | }; 123 | 124 | const run = async () => { 125 | console.log('---------------------------------------------------------'); 126 | let projectName = await readInput('Project name, e.g. My Amazing Project'); 127 | console.log('---------------------------------------------------------'); 128 | if (!projectName || projectName === '' || projectName.trim() === '') { 129 | throw new Error('ERROR: Please supply a project name'); 130 | } 131 | if (!projectName.match(VALID_CHARACTERS)) { 132 | throw new Error('ERROR: The project name must only contain letters or spaces'); 133 | } 134 | 135 | let companyName = await readInput('Company name, e.g. My Company'); 136 | console.log('---------------------------------------------------------'); 137 | if (!companyName || companyName === '' || companyName.trim() === '') { 138 | throw new Error('ERROR: Please supply a company name'); 139 | } 140 | if (!companyName.match(VALID_CHARACTERS)) { 141 | throw new Error('ERROR: The company name must only contain letters or spaces'); 142 | } 143 | 144 | projectName = projectName.replace(/ /g, ''); 145 | companyName = companyName.replace(/ /g, '').toLowerCase(); 146 | 147 | const packageName = `com.${companyName}.${projectName.toLowerCase()}`; 148 | // Close the input 149 | rl.close(); 150 | 151 | updateProjectName(projectName) 152 | .then(() => updatePackageName(packageName)) 153 | .then(() => renameProjectFiles(projectName)) 154 | .then(() => renameCompanyFiles(companyName)) 155 | .then(() => { 156 | console.log(); 157 | console.log('---------------------------------------------------------'); 158 | console.log('Set project parameters to:'); 159 | console.log('---------------------------------------------------------'); 160 | console.log('Project name: ', projectName); 161 | console.log('Company name: ', companyName); 162 | console.log('Package name: ', packageName); 163 | console.log('---------------------------------------------------------'); 164 | console.log(); 165 | }); 166 | }; 167 | 168 | run().catch((error) => { 169 | console.error(error.message); 170 | console.log('---------------------------------------------------------'); 171 | process.exit(); 172 | }); 173 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '9.0' 3 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 4 | 5 | target 'ReactNativeFirebaseUIExample' do 6 | # Pods for ReactNativeFirebaseUIExample 7 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 8 | # use_frameworks! 9 | 10 | # Pods for RN-firebase-starter 11 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" 12 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" 13 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" 14 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" 15 | pod 'React', :path => '../node_modules/react-native/' 16 | pod 'React-Core', :path => '../node_modules/react-native/' 17 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' 18 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' 19 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' 20 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' 21 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' 22 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' 23 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' 24 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' 25 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' 26 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' 27 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' 28 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' 29 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' 30 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' 31 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' 32 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' 33 | pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" 34 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" 35 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' 36 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' 37 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' 38 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' 39 | 40 | # Required by RNFirebase 41 | pod 'Firebase/Core', '~> 6.13.0' 42 | 43 | # [OPTIONAL PODS] - comment out pods for firebase products you won't be using. 44 | pod 'Firebase/AdMob', '~> 6.13.0' 45 | pod 'Firebase/Auth', '~> 6.13.0' 46 | pod 'Firebase/Database', '~> 6.13.0' 47 | pod 'Firebase/Functions', '~> 6.13.0' 48 | pod 'Firebase/DynamicLinks', '~> 6.13.0' 49 | pod 'Firebase/Firestore', '~> 6.13.0' 50 | pod 'Firebase/Messaging', '~> 6.13.0' 51 | pod 'Firebase/RemoteConfig', '~> 6.13.0' 52 | pod 'Firebase/Storage', '~> 6.13.0' 53 | pod 'Firebase/Performance', '~> 6.13.0' 54 | pod 'Fabric', '~> 1.10.2' 55 | pod 'Crashlytics', '~> 3.14.0' 56 | 57 | target 'ReactNativeFirebaseUIExampleTests' do 58 | inherit! :search_paths 59 | # Pods for testing 60 | end 61 | 62 | use_native_modules! 63 | 64 | end 65 | 66 | target 'ReactNativeFirebaseUIExample-tvOS' do 67 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 68 | # use_frameworks! 69 | 70 | # Pods for ReactNativeFirebaseUIExample-tvOS 71 | 72 | target 'ReactNativeFirebaseUIExample-tvOSTests' do 73 | inherit! :search_paths 74 | # Pods for testing 75 | end 76 | 77 | end 78 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - abseil/algorithm (0.20190808): 3 | - abseil/algorithm/algorithm (= 0.20190808) 4 | - abseil/algorithm/container (= 0.20190808) 5 | - abseil/algorithm/algorithm (0.20190808) 6 | - abseil/algorithm/container (0.20190808): 7 | - abseil/algorithm/algorithm 8 | - abseil/base/core_headers 9 | - abseil/meta/type_traits 10 | - abseil/base (0.20190808): 11 | - abseil/base/atomic_hook (= 0.20190808) 12 | - abseil/base/base (= 0.20190808) 13 | - abseil/base/base_internal (= 0.20190808) 14 | - abseil/base/bits (= 0.20190808) 15 | - abseil/base/config (= 0.20190808) 16 | - abseil/base/core_headers (= 0.20190808) 17 | - abseil/base/dynamic_annotations (= 0.20190808) 18 | - abseil/base/endian (= 0.20190808) 19 | - abseil/base/log_severity (= 0.20190808) 20 | - abseil/base/malloc_internal (= 0.20190808) 21 | - abseil/base/pretty_function (= 0.20190808) 22 | - abseil/base/spinlock_wait (= 0.20190808) 23 | - abseil/base/throw_delegate (= 0.20190808) 24 | - abseil/base/atomic_hook (0.20190808) 25 | - abseil/base/base (0.20190808): 26 | - abseil/base/atomic_hook 27 | - abseil/base/base_internal 28 | - abseil/base/config 29 | - abseil/base/core_headers 30 | - abseil/base/dynamic_annotations 31 | - abseil/base/log_severity 32 | - abseil/base/spinlock_wait 33 | - abseil/meta/type_traits 34 | - abseil/base/base_internal (0.20190808): 35 | - abseil/meta/type_traits 36 | - abseil/base/bits (0.20190808): 37 | - abseil/base/core_headers 38 | - abseil/base/config (0.20190808) 39 | - abseil/base/core_headers (0.20190808): 40 | - abseil/base/config 41 | - abseil/base/dynamic_annotations (0.20190808) 42 | - abseil/base/endian (0.20190808): 43 | - abseil/base/config 44 | - abseil/base/core_headers 45 | - abseil/base/log_severity (0.20190808): 46 | - abseil/base/core_headers 47 | - abseil/base/malloc_internal (0.20190808): 48 | - abseil/base/base 49 | - abseil/base/config 50 | - abseil/base/core_headers 51 | - abseil/base/dynamic_annotations 52 | - abseil/base/spinlock_wait 53 | - abseil/base/pretty_function (0.20190808) 54 | - abseil/base/spinlock_wait (0.20190808): 55 | - abseil/base/core_headers 56 | - abseil/base/throw_delegate (0.20190808): 57 | - abseil/base/base 58 | - abseil/base/config 59 | - abseil/memory (0.20190808): 60 | - abseil/memory/memory (= 0.20190808) 61 | - abseil/memory/memory (0.20190808): 62 | - abseil/base/core_headers 63 | - abseil/meta/type_traits 64 | - abseil/meta (0.20190808): 65 | - abseil/meta/type_traits (= 0.20190808) 66 | - abseil/meta/type_traits (0.20190808): 67 | - abseil/base/config 68 | - abseil/numeric/int128 (0.20190808): 69 | - abseil/base/config 70 | - abseil/base/core_headers 71 | - abseil/strings/internal (0.20190808): 72 | - abseil/base/core_headers 73 | - abseil/base/endian 74 | - abseil/meta/type_traits 75 | - abseil/strings/strings (0.20190808): 76 | - abseil/base/base 77 | - abseil/base/bits 78 | - abseil/base/config 79 | - abseil/base/core_headers 80 | - abseil/base/endian 81 | - abseil/base/throw_delegate 82 | - abseil/memory/memory 83 | - abseil/meta/type_traits 84 | - abseil/numeric/int128 85 | - abseil/strings/internal 86 | - abseil/time (0.20190808): 87 | - abseil/time/internal (= 0.20190808) 88 | - abseil/time/time (= 0.20190808) 89 | - abseil/time/internal (0.20190808): 90 | - abseil/time/internal/cctz (= 0.20190808) 91 | - abseil/time/internal/cctz (0.20190808): 92 | - abseil/time/internal/cctz/civil_time (= 0.20190808) 93 | - abseil/time/internal/cctz/includes (= 0.20190808) 94 | - abseil/time/internal/cctz/time_zone (= 0.20190808) 95 | - abseil/time/internal/cctz/civil_time (0.20190808) 96 | - abseil/time/internal/cctz/includes (0.20190808) 97 | - abseil/time/internal/cctz/time_zone (0.20190808): 98 | - abseil/time/internal/cctz/civil_time 99 | - abseil/time/time (0.20190808): 100 | - abseil/base/base 101 | - abseil/base/core_headers 102 | - abseil/numeric/int128 103 | - abseil/strings/strings 104 | - abseil/time/internal/cctz/civil_time 105 | - abseil/time/internal/cctz/time_zone 106 | - abseil/types (0.20190808): 107 | - abseil/types/any (= 0.20190808) 108 | - abseil/types/bad_any_cast (= 0.20190808) 109 | - abseil/types/bad_any_cast_impl (= 0.20190808) 110 | - abseil/types/bad_optional_access (= 0.20190808) 111 | - abseil/types/bad_variant_access (= 0.20190808) 112 | - abseil/types/compare (= 0.20190808) 113 | - abseil/types/optional (= 0.20190808) 114 | - abseil/types/span (= 0.20190808) 115 | - abseil/types/variant (= 0.20190808) 116 | - abseil/types/any (0.20190808): 117 | - abseil/base/config 118 | - abseil/base/core_headers 119 | - abseil/meta/type_traits 120 | - abseil/types/bad_any_cast 121 | - abseil/utility/utility 122 | - abseil/types/bad_any_cast (0.20190808): 123 | - abseil/base/config 124 | - abseil/types/bad_any_cast_impl 125 | - abseil/types/bad_any_cast_impl (0.20190808): 126 | - abseil/base/base 127 | - abseil/base/config 128 | - abseil/types/bad_optional_access (0.20190808): 129 | - abseil/base/base 130 | - abseil/base/config 131 | - abseil/types/bad_variant_access (0.20190808): 132 | - abseil/base/base 133 | - abseil/base/config 134 | - abseil/types/compare (0.20190808): 135 | - abseil/base/core_headers 136 | - abseil/meta/type_traits 137 | - abseil/types/optional (0.20190808): 138 | - abseil/base/base_internal 139 | - abseil/base/config 140 | - abseil/base/core_headers 141 | - abseil/memory/memory 142 | - abseil/meta/type_traits 143 | - abseil/types/bad_optional_access 144 | - abseil/utility/utility 145 | - abseil/types/span (0.20190808): 146 | - abseil/algorithm/algorithm 147 | - abseil/base/core_headers 148 | - abseil/base/throw_delegate 149 | - abseil/meta/type_traits 150 | - abseil/types/variant (0.20190808): 151 | - abseil/base/base_internal 152 | - abseil/base/config 153 | - abseil/base/core_headers 154 | - abseil/meta/type_traits 155 | - abseil/types/bad_variant_access 156 | - abseil/utility/utility 157 | - abseil/utility/utility (0.20190808): 158 | - abseil/base/base_internal 159 | - abseil/base/config 160 | - abseil/meta/type_traits 161 | - boost-for-react-native (1.63.0) 162 | - BoringSSL-GRPC (0.0.3): 163 | - BoringSSL-GRPC/Implementation (= 0.0.3) 164 | - BoringSSL-GRPC/Interface (= 0.0.3) 165 | - BoringSSL-GRPC/Implementation (0.0.3): 166 | - BoringSSL-GRPC/Interface (= 0.0.3) 167 | - BoringSSL-GRPC/Interface (0.0.3) 168 | - Crashlytics (3.14.0): 169 | - Fabric (~> 1.10.2) 170 | - DoubleConversion (1.1.6) 171 | - Fabric (1.10.2) 172 | - FBLazyVector (0.61.2) 173 | - FBReactNativeSpec (0.61.2): 174 | - Folly (= 2018.10.22.00) 175 | - RCTRequired (= 0.61.2) 176 | - RCTTypeSafety (= 0.61.2) 177 | - React-Core (= 0.61.2) 178 | - React-jsi (= 0.61.2) 179 | - ReactCommon/turbomodule/core (= 0.61.2) 180 | - Firebase/AdMob (6.13.0): 181 | - Firebase/CoreOnly 182 | - Google-Mobile-Ads-SDK (~> 7.50) 183 | - Firebase/Auth (6.13.0): 184 | - Firebase/CoreOnly 185 | - FirebaseAuth (~> 6.4.0) 186 | - Firebase/Core (6.13.0): 187 | - Firebase/CoreOnly 188 | - FirebaseAnalytics (= 6.1.6) 189 | - Firebase/CoreOnly (6.13.0): 190 | - FirebaseCore (= 6.4.0) 191 | - Firebase/Database (6.13.0): 192 | - Firebase/CoreOnly 193 | - FirebaseDatabase (~> 6.1.2) 194 | - Firebase/DynamicLinks (6.13.0): 195 | - Firebase/CoreOnly 196 | - FirebaseDynamicLinks (~> 4.0.5) 197 | - Firebase/Firestore (6.13.0): 198 | - Firebase/CoreOnly 199 | - FirebaseFirestore (~> 1.8.0) 200 | - Firebase/Functions (6.13.0): 201 | - Firebase/CoreOnly 202 | - FirebaseFunctions (~> 2.5.1) 203 | - Firebase/Messaging (6.13.0): 204 | - Firebase/CoreOnly 205 | - FirebaseMessaging (~> 4.1.9) 206 | - Firebase/Performance (6.13.0): 207 | - Firebase/CoreOnly 208 | - FirebasePerformance (~> 3.1.7) 209 | - Firebase/RemoteConfig (6.13.0): 210 | - Firebase/CoreOnly 211 | - FirebaseRemoteConfig (~> 4.4.5) 212 | - Firebase/Storage (6.13.0): 213 | - Firebase/CoreOnly 214 | - FirebaseStorage (~> 3.4.2) 215 | - FirebaseABTesting (3.2.0): 216 | - FirebaseAnalyticsInterop (~> 1.3) 217 | - FirebaseCore (~> 6.1) 218 | - Protobuf (>= 3.9.2, ~> 3.9) 219 | - FirebaseAnalytics (6.1.6): 220 | - FirebaseCore (~> 6.4) 221 | - FirebaseInstanceID (~> 4.2) 222 | - GoogleAppMeasurement (= 6.1.6) 223 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 224 | - GoogleUtilities/MethodSwizzler (~> 6.0) 225 | - GoogleUtilities/Network (~> 6.0) 226 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 227 | - nanopb (= 0.3.9011) 228 | - FirebaseAnalyticsInterop (1.5.0) 229 | - FirebaseAuth (6.4.2): 230 | - FirebaseAuthInterop (~> 1.0) 231 | - FirebaseCore (~> 6.2) 232 | - GoogleUtilities/AppDelegateSwizzler (~> 6.2) 233 | - GoogleUtilities/Environment (~> 6.2) 234 | - GTMSessionFetcher/Core (~> 1.1) 235 | - FirebaseAuthInterop (1.1.0) 236 | - FirebaseCore (6.4.0): 237 | - FirebaseCoreDiagnostics (~> 1.0) 238 | - FirebaseCoreDiagnosticsInterop (~> 1.0) 239 | - GoogleUtilities/Environment (~> 6.2) 240 | - GoogleUtilities/Logger (~> 6.2) 241 | - FirebaseCoreDiagnostics (1.2.2): 242 | - FirebaseCoreDiagnosticsInterop (~> 1.2) 243 | - GoogleDataTransportCCTSupport (~> 2.0) 244 | - GoogleUtilities/Environment (~> 6.5) 245 | - GoogleUtilities/Logger (~> 6.5) 246 | - nanopb (~> 0.3.901) 247 | - FirebaseCoreDiagnosticsInterop (1.2.0) 248 | - FirebaseDatabase (6.1.4): 249 | - FirebaseAuthInterop (~> 1.0) 250 | - FirebaseCore (~> 6.0) 251 | - leveldb-library (~> 1.22) 252 | - FirebaseDynamicLinks (4.0.7): 253 | - FirebaseAnalyticsInterop (~> 1.3) 254 | - FirebaseCore (~> 6.2) 255 | - FirebaseFirestore (1.8.3): 256 | - abseil/algorithm (= 0.20190808) 257 | - abseil/base (= 0.20190808) 258 | - abseil/memory (= 0.20190808) 259 | - abseil/meta (= 0.20190808) 260 | - abseil/strings/strings (= 0.20190808) 261 | - abseil/time (= 0.20190808) 262 | - abseil/types (= 0.20190808) 263 | - FirebaseAuthInterop (~> 1.0) 264 | - FirebaseCore (~> 6.2) 265 | - "gRPC-C++ (= 0.0.9)" 266 | - leveldb-library (~> 1.22) 267 | - nanopb (~> 0.3.901) 268 | - FirebaseFunctions (2.5.1): 269 | - FirebaseAuthInterop (~> 1.0) 270 | - FirebaseCore (~> 6.0) 271 | - GTMSessionFetcher/Core (~> 1.1) 272 | - FirebaseInstanceID (4.2.7): 273 | - FirebaseCore (~> 6.0) 274 | - GoogleUtilities/Environment (~> 6.0) 275 | - GoogleUtilities/UserDefaults (~> 6.0) 276 | - FirebaseMessaging (4.1.10): 277 | - FirebaseAnalyticsInterop (~> 1.3) 278 | - FirebaseCore (~> 6.2) 279 | - FirebaseInstanceID (~> 4.1) 280 | - GoogleUtilities/AppDelegateSwizzler (~> 6.2) 281 | - GoogleUtilities/Environment (~> 6.2) 282 | - GoogleUtilities/Reachability (~> 6.2) 283 | - GoogleUtilities/UserDefaults (~> 6.2) 284 | - Protobuf (>= 3.9.2, ~> 3.9) 285 | - FirebasePerformance (3.1.7): 286 | - FirebaseCore (~> 6.4) 287 | - FirebaseInstanceID (~> 4.2) 288 | - FirebaseRemoteConfig (~> 4.4) 289 | - GoogleToolboxForMac/Logger (~> 2.1) 290 | - "GoogleToolboxForMac/NSData+zlib (~> 2.1)" 291 | - GoogleUtilities/Environment (~> 6.2) 292 | - GoogleUtilities/ISASwizzler (~> 6.2) 293 | - GoogleUtilities/MethodSwizzler (~> 6.2) 294 | - GTMSessionFetcher/Core (~> 1.1) 295 | - Protobuf (~> 3.9) 296 | - FirebaseRemoteConfig (4.4.9): 297 | - FirebaseABTesting (~> 3.1) 298 | - FirebaseAnalyticsInterop (~> 1.4) 299 | - FirebaseCore (~> 6.2) 300 | - FirebaseInstanceID (~> 4.2) 301 | - GoogleUtilities/Environment (~> 6.2) 302 | - "GoogleUtilities/NSData+zlib (~> 6.2)" 303 | - Protobuf (>= 3.9.2, ~> 3.9) 304 | - FirebaseStorage (3.4.3): 305 | - FirebaseAuthInterop (~> 1.0) 306 | - FirebaseCore (~> 6.0) 307 | - GTMSessionFetcher/Core (~> 1.1) 308 | - FirebaseUI/Storage (8.4.2): 309 | - Firebase/Storage (~> 6.0) 310 | - SDWebImage (~> 5.0) 311 | - Folly (2018.10.22.00): 312 | - boost-for-react-native 313 | - DoubleConversion 314 | - Folly/Default (= 2018.10.22.00) 315 | - glog 316 | - Folly/Default (2018.10.22.00): 317 | - boost-for-react-native 318 | - DoubleConversion 319 | - glog 320 | - glog (0.3.5) 321 | - Google-Mobile-Ads-SDK (7.57.0): 322 | - GoogleAppMeasurement (~> 6.0) 323 | - GoogleAppMeasurement (6.1.6): 324 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 325 | - GoogleUtilities/MethodSwizzler (~> 6.0) 326 | - GoogleUtilities/Network (~> 6.0) 327 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 328 | - nanopb (= 0.3.9011) 329 | - GoogleDataTransport (5.0.0) 330 | - GoogleDataTransportCCTSupport (2.0.0): 331 | - GoogleDataTransport (~> 5.0) 332 | - nanopb (~> 0.3.901) 333 | - GoogleToolboxForMac/Defines (2.2.2) 334 | - GoogleToolboxForMac/Logger (2.2.2): 335 | - GoogleToolboxForMac/Defines (= 2.2.2) 336 | - "GoogleToolboxForMac/NSData+zlib (2.2.2)": 337 | - GoogleToolboxForMac/Defines (= 2.2.2) 338 | - GoogleUtilities/AppDelegateSwizzler (6.5.2): 339 | - GoogleUtilities/Environment 340 | - GoogleUtilities/Logger 341 | - GoogleUtilities/Network 342 | - GoogleUtilities/Environment (6.5.2) 343 | - GoogleUtilities/ISASwizzler (6.5.2) 344 | - GoogleUtilities/Logger (6.5.2): 345 | - GoogleUtilities/Environment 346 | - GoogleUtilities/MethodSwizzler (6.5.2): 347 | - GoogleUtilities/Logger 348 | - GoogleUtilities/Network (6.5.2): 349 | - GoogleUtilities/Logger 350 | - "GoogleUtilities/NSData+zlib" 351 | - GoogleUtilities/Reachability 352 | - "GoogleUtilities/NSData+zlib (6.5.2)" 353 | - GoogleUtilities/Reachability (6.5.2): 354 | - GoogleUtilities/Logger 355 | - GoogleUtilities/UserDefaults (6.5.2): 356 | - GoogleUtilities/Logger 357 | - "gRPC-C++ (0.0.9)": 358 | - "gRPC-C++/Implementation (= 0.0.9)" 359 | - "gRPC-C++/Interface (= 0.0.9)" 360 | - "gRPC-C++/Implementation (0.0.9)": 361 | - "gRPC-C++/Interface (= 0.0.9)" 362 | - gRPC-Core (= 1.21.0) 363 | - nanopb (~> 0.3) 364 | - "gRPC-C++/Interface (0.0.9)" 365 | - gRPC-Core (1.21.0): 366 | - gRPC-Core/Implementation (= 1.21.0) 367 | - gRPC-Core/Interface (= 1.21.0) 368 | - gRPC-Core/Implementation (1.21.0): 369 | - BoringSSL-GRPC (= 0.0.3) 370 | - gRPC-Core/Interface (= 1.21.0) 371 | - nanopb (~> 0.3) 372 | - gRPC-Core/Interface (1.21.0) 373 | - GTMSessionFetcher/Core (1.3.1) 374 | - leveldb-library (1.22) 375 | - nanopb (0.3.9011): 376 | - nanopb/decode (= 0.3.9011) 377 | - nanopb/encode (= 0.3.9011) 378 | - nanopb/decode (0.3.9011) 379 | - nanopb/encode (0.3.9011) 380 | - Protobuf (3.11.4) 381 | - RCTRequired (0.61.2) 382 | - RCTTypeSafety (0.61.2): 383 | - FBLazyVector (= 0.61.2) 384 | - Folly (= 2018.10.22.00) 385 | - RCTRequired (= 0.61.2) 386 | - React-Core (= 0.61.2) 387 | - React (0.61.2): 388 | - React-Core (= 0.61.2) 389 | - React-Core/DevSupport (= 0.61.2) 390 | - React-Core/RCTWebSocket (= 0.61.2) 391 | - React-RCTActionSheet (= 0.61.2) 392 | - React-RCTAnimation (= 0.61.2) 393 | - React-RCTBlob (= 0.61.2) 394 | - React-RCTImage (= 0.61.2) 395 | - React-RCTLinking (= 0.61.2) 396 | - React-RCTNetwork (= 0.61.2) 397 | - React-RCTSettings (= 0.61.2) 398 | - React-RCTText (= 0.61.2) 399 | - React-RCTVibration (= 0.61.2) 400 | - React-Core (0.61.2): 401 | - Folly (= 2018.10.22.00) 402 | - glog 403 | - React-Core/Default (= 0.61.2) 404 | - React-cxxreact (= 0.61.2) 405 | - React-jsi (= 0.61.2) 406 | - React-jsiexecutor (= 0.61.2) 407 | - Yoga 408 | - React-Core/CoreModulesHeaders (0.61.2): 409 | - Folly (= 2018.10.22.00) 410 | - glog 411 | - React-Core/Default 412 | - React-cxxreact (= 0.61.2) 413 | - React-jsi (= 0.61.2) 414 | - React-jsiexecutor (= 0.61.2) 415 | - Yoga 416 | - React-Core/Default (0.61.2): 417 | - Folly (= 2018.10.22.00) 418 | - glog 419 | - React-cxxreact (= 0.61.2) 420 | - React-jsi (= 0.61.2) 421 | - React-jsiexecutor (= 0.61.2) 422 | - Yoga 423 | - React-Core/DevSupport (0.61.2): 424 | - Folly (= 2018.10.22.00) 425 | - glog 426 | - React-Core/Default (= 0.61.2) 427 | - React-Core/RCTWebSocket (= 0.61.2) 428 | - React-cxxreact (= 0.61.2) 429 | - React-jsi (= 0.61.2) 430 | - React-jsiexecutor (= 0.61.2) 431 | - React-jsinspector (= 0.61.2) 432 | - Yoga 433 | - React-Core/RCTActionSheetHeaders (0.61.2): 434 | - Folly (= 2018.10.22.00) 435 | - glog 436 | - React-Core/Default 437 | - React-cxxreact (= 0.61.2) 438 | - React-jsi (= 0.61.2) 439 | - React-jsiexecutor (= 0.61.2) 440 | - Yoga 441 | - React-Core/RCTAnimationHeaders (0.61.2): 442 | - Folly (= 2018.10.22.00) 443 | - glog 444 | - React-Core/Default 445 | - React-cxxreact (= 0.61.2) 446 | - React-jsi (= 0.61.2) 447 | - React-jsiexecutor (= 0.61.2) 448 | - Yoga 449 | - React-Core/RCTBlobHeaders (0.61.2): 450 | - Folly (= 2018.10.22.00) 451 | - glog 452 | - React-Core/Default 453 | - React-cxxreact (= 0.61.2) 454 | - React-jsi (= 0.61.2) 455 | - React-jsiexecutor (= 0.61.2) 456 | - Yoga 457 | - React-Core/RCTImageHeaders (0.61.2): 458 | - Folly (= 2018.10.22.00) 459 | - glog 460 | - React-Core/Default 461 | - React-cxxreact (= 0.61.2) 462 | - React-jsi (= 0.61.2) 463 | - React-jsiexecutor (= 0.61.2) 464 | - Yoga 465 | - React-Core/RCTLinkingHeaders (0.61.2): 466 | - Folly (= 2018.10.22.00) 467 | - glog 468 | - React-Core/Default 469 | - React-cxxreact (= 0.61.2) 470 | - React-jsi (= 0.61.2) 471 | - React-jsiexecutor (= 0.61.2) 472 | - Yoga 473 | - React-Core/RCTNetworkHeaders (0.61.2): 474 | - Folly (= 2018.10.22.00) 475 | - glog 476 | - React-Core/Default 477 | - React-cxxreact (= 0.61.2) 478 | - React-jsi (= 0.61.2) 479 | - React-jsiexecutor (= 0.61.2) 480 | - Yoga 481 | - React-Core/RCTSettingsHeaders (0.61.2): 482 | - Folly (= 2018.10.22.00) 483 | - glog 484 | - React-Core/Default 485 | - React-cxxreact (= 0.61.2) 486 | - React-jsi (= 0.61.2) 487 | - React-jsiexecutor (= 0.61.2) 488 | - Yoga 489 | - React-Core/RCTTextHeaders (0.61.2): 490 | - Folly (= 2018.10.22.00) 491 | - glog 492 | - React-Core/Default 493 | - React-cxxreact (= 0.61.2) 494 | - React-jsi (= 0.61.2) 495 | - React-jsiexecutor (= 0.61.2) 496 | - Yoga 497 | - React-Core/RCTVibrationHeaders (0.61.2): 498 | - Folly (= 2018.10.22.00) 499 | - glog 500 | - React-Core/Default 501 | - React-cxxreact (= 0.61.2) 502 | - React-jsi (= 0.61.2) 503 | - React-jsiexecutor (= 0.61.2) 504 | - Yoga 505 | - React-Core/RCTWebSocket (0.61.2): 506 | - Folly (= 2018.10.22.00) 507 | - glog 508 | - React-Core/Default (= 0.61.2) 509 | - React-cxxreact (= 0.61.2) 510 | - React-jsi (= 0.61.2) 511 | - React-jsiexecutor (= 0.61.2) 512 | - Yoga 513 | - React-CoreModules (0.61.2): 514 | - FBReactNativeSpec (= 0.61.2) 515 | - Folly (= 2018.10.22.00) 516 | - RCTTypeSafety (= 0.61.2) 517 | - React-Core/CoreModulesHeaders (= 0.61.2) 518 | - React-RCTImage (= 0.61.2) 519 | - ReactCommon/turbomodule/core (= 0.61.2) 520 | - React-cxxreact (0.61.2): 521 | - boost-for-react-native (= 1.63.0) 522 | - DoubleConversion 523 | - Folly (= 2018.10.22.00) 524 | - glog 525 | - React-jsinspector (= 0.61.2) 526 | - React-jsi (0.61.2): 527 | - boost-for-react-native (= 1.63.0) 528 | - DoubleConversion 529 | - Folly (= 2018.10.22.00) 530 | - glog 531 | - React-jsi/Default (= 0.61.2) 532 | - React-jsi/Default (0.61.2): 533 | - boost-for-react-native (= 1.63.0) 534 | - DoubleConversion 535 | - Folly (= 2018.10.22.00) 536 | - glog 537 | - React-jsiexecutor (0.61.2): 538 | - DoubleConversion 539 | - Folly (= 2018.10.22.00) 540 | - glog 541 | - React-cxxreact (= 0.61.2) 542 | - React-jsi (= 0.61.2) 543 | - React-jsinspector (0.61.2) 544 | - react-native-firebaseui (0.3.0): 545 | - FirebaseUI/Storage 546 | - React 547 | - React-RCTActionSheet (0.61.2): 548 | - React-Core/RCTActionSheetHeaders (= 0.61.2) 549 | - React-RCTAnimation (0.61.2): 550 | - React-Core/RCTAnimationHeaders (= 0.61.2) 551 | - React-RCTBlob (0.61.2): 552 | - React-Core/RCTBlobHeaders (= 0.61.2) 553 | - React-Core/RCTWebSocket (= 0.61.2) 554 | - React-jsi (= 0.61.2) 555 | - React-RCTNetwork (= 0.61.2) 556 | - React-RCTImage (0.61.2): 557 | - React-Core/RCTImageHeaders (= 0.61.2) 558 | - React-RCTNetwork (= 0.61.2) 559 | - React-RCTLinking (0.61.2): 560 | - React-Core/RCTLinkingHeaders (= 0.61.2) 561 | - React-RCTNetwork (0.61.2): 562 | - React-Core/RCTNetworkHeaders (= 0.61.2) 563 | - React-RCTSettings (0.61.2): 564 | - React-Core/RCTSettingsHeaders (= 0.61.2) 565 | - React-RCTText (0.61.2): 566 | - React-Core/RCTTextHeaders (= 0.61.2) 567 | - React-RCTVibration (0.61.2): 568 | - React-Core/RCTVibrationHeaders (= 0.61.2) 569 | - ReactCommon/jscallinvoker (0.61.2): 570 | - DoubleConversion 571 | - Folly (= 2018.10.22.00) 572 | - glog 573 | - React-cxxreact (= 0.61.2) 574 | - ReactCommon/turbomodule/core (0.61.2): 575 | - DoubleConversion 576 | - Folly (= 2018.10.22.00) 577 | - glog 578 | - React-Core (= 0.61.2) 579 | - React-cxxreact (= 0.61.2) 580 | - React-jsi (= 0.61.2) 581 | - ReactCommon/jscallinvoker (= 0.61.2) 582 | - RNFirebase (5.6.0): 583 | - Firebase/Core 584 | - React 585 | - RNFirebase/Crashlytics (= 5.6.0) 586 | - RNFirebase/Crashlytics (5.6.0): 587 | - Crashlytics 588 | - Fabric 589 | - Firebase/Core 590 | - React 591 | - SDWebImage (5.6.1): 592 | - SDWebImage/Core (= 5.6.1) 593 | - SDWebImage/Core (5.6.1) 594 | - Yoga (1.14.0) 595 | 596 | DEPENDENCIES: 597 | - Crashlytics (~> 3.14.0) 598 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 599 | - Fabric (~> 1.10.2) 600 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 601 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) 602 | - Firebase/AdMob (~> 6.13.0) 603 | - Firebase/Auth (~> 6.13.0) 604 | - Firebase/Core (~> 6.13.0) 605 | - Firebase/Database (~> 6.13.0) 606 | - Firebase/DynamicLinks (~> 6.13.0) 607 | - Firebase/Firestore (~> 6.13.0) 608 | - Firebase/Functions (~> 6.13.0) 609 | - Firebase/Messaging (~> 6.13.0) 610 | - Firebase/Performance (~> 6.13.0) 611 | - Firebase/RemoteConfig (~> 6.13.0) 612 | - Firebase/Storage (~> 6.13.0) 613 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) 614 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 615 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 616 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 617 | - React (from `../node_modules/react-native/`) 618 | - React-Core (from `../node_modules/react-native/`) 619 | - React-Core/DevSupport (from `../node_modules/react-native/`) 620 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 621 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 622 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 623 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 624 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 625 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 626 | - react-native-firebaseui (from `../node_modules/react-native-firebaseui`) 627 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 628 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 629 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 630 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 631 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 632 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 633 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 634 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 635 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 636 | - ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`) 637 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 638 | - RNFirebase (from `../node_modules/react-native-firebase/ios`) 639 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 640 | 641 | SPEC REPOS: 642 | trunk: 643 | - abseil 644 | - boost-for-react-native 645 | - BoringSSL-GRPC 646 | - Crashlytics 647 | - Fabric 648 | - Firebase 649 | - FirebaseABTesting 650 | - FirebaseAnalytics 651 | - FirebaseAnalyticsInterop 652 | - FirebaseAuth 653 | - FirebaseAuthInterop 654 | - FirebaseCore 655 | - FirebaseCoreDiagnostics 656 | - FirebaseCoreDiagnosticsInterop 657 | - FirebaseDatabase 658 | - FirebaseDynamicLinks 659 | - FirebaseFirestore 660 | - FirebaseFunctions 661 | - FirebaseInstanceID 662 | - FirebaseMessaging 663 | - FirebasePerformance 664 | - FirebaseRemoteConfig 665 | - FirebaseStorage 666 | - FirebaseUI 667 | - Google-Mobile-Ads-SDK 668 | - GoogleAppMeasurement 669 | - GoogleDataTransport 670 | - GoogleDataTransportCCTSupport 671 | - GoogleToolboxForMac 672 | - GoogleUtilities 673 | - "gRPC-C++" 674 | - gRPC-Core 675 | - GTMSessionFetcher 676 | - leveldb-library 677 | - nanopb 678 | - Protobuf 679 | - SDWebImage 680 | 681 | EXTERNAL SOURCES: 682 | DoubleConversion: 683 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 684 | FBLazyVector: 685 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 686 | FBReactNativeSpec: 687 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" 688 | Folly: 689 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" 690 | glog: 691 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 692 | RCTRequired: 693 | :path: "../node_modules/react-native/Libraries/RCTRequired" 694 | RCTTypeSafety: 695 | :path: "../node_modules/react-native/Libraries/TypeSafety" 696 | React: 697 | :path: "../node_modules/react-native/" 698 | React-Core: 699 | :path: "../node_modules/react-native/" 700 | React-CoreModules: 701 | :path: "../node_modules/react-native/React/CoreModules" 702 | React-cxxreact: 703 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 704 | React-jsi: 705 | :path: "../node_modules/react-native/ReactCommon/jsi" 706 | React-jsiexecutor: 707 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 708 | React-jsinspector: 709 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 710 | react-native-firebaseui: 711 | :path: "../node_modules/react-native-firebaseui" 712 | React-RCTActionSheet: 713 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 714 | React-RCTAnimation: 715 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 716 | React-RCTBlob: 717 | :path: "../node_modules/react-native/Libraries/Blob" 718 | React-RCTImage: 719 | :path: "../node_modules/react-native/Libraries/Image" 720 | React-RCTLinking: 721 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 722 | React-RCTNetwork: 723 | :path: "../node_modules/react-native/Libraries/Network" 724 | React-RCTSettings: 725 | :path: "../node_modules/react-native/Libraries/Settings" 726 | React-RCTText: 727 | :path: "../node_modules/react-native/Libraries/Text" 728 | React-RCTVibration: 729 | :path: "../node_modules/react-native/Libraries/Vibration" 730 | ReactCommon: 731 | :path: "../node_modules/react-native/ReactCommon" 732 | RNFirebase: 733 | :path: "../node_modules/react-native-firebase/ios" 734 | Yoga: 735 | :path: "../node_modules/react-native/ReactCommon/yoga" 736 | 737 | SPEC CHECKSUMS: 738 | abseil: 18063d773f5366ff8736a050fe035a28f635fd27 739 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 740 | BoringSSL-GRPC: db8764df3204ccea016e1c8dd15d9a9ad63ff318 741 | Crashlytics: 540b7e5f5da5a042647227a5e3ac51d85eed06df 742 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 743 | Fabric: 706c8b8098fff96c33c0db69cbf81f9c551d0d74 744 | FBLazyVector: 68b6a76960fbd8ecd9fb7ce0aadd3329c3340a99 745 | FBReactNativeSpec: 5a764c60abdc3336a213e5310c40b74741f32839 746 | Firebase: 458d109512200d1aca2e1b9b6cf7d68a869a4a46 747 | FirebaseABTesting: 821a3a3e4a145987e80fee3657c4de1cb9adf693 748 | FirebaseAnalytics: 45f36d9c429fc91d206283900ab75390cd05ee8a 749 | FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae 750 | FirebaseAuth: ce45d7c5d46bed90159f3a73b6efbe8976ed3573 751 | FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9 752 | FirebaseCore: 307ea2508df730c5865334e41965bd9ea344b0e5 753 | FirebaseCoreDiagnostics: e9b4cd8ba60dee0f2d13347332e4b7898cca5b61 754 | FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 755 | FirebaseDatabase: 0144e0706a4761f1b0e8679572eba8095ddb59be 756 | FirebaseDynamicLinks: b3338d0c0423ee3d409f5ecc0fb774a9baa6537b 757 | FirebaseFirestore: 52120e2833f804a874ba1a9f59aab864a8ae2286 758 | FirebaseFunctions: 5af7c35d1c5e41608fecbb667eb6c4e672e318d0 759 | FirebaseInstanceID: ebd2ea79ee38db0cb5f5167b17a0d387e1cc7b6e 760 | FirebaseMessaging: 089b7a4991425783384acc8bcefcd78c0af913bd 761 | FirebasePerformance: 22273a775eaed4cd3e072c9b88396a5e4b285c3f 762 | FirebaseRemoteConfig: 47abf7a04a9082091955ea555aa79cfdd249b19c 763 | FirebaseStorage: 93fe2f8190a01bfb2b2c4932df7d679744c4ef1d 764 | FirebaseUI: e57e9b9c4340631151fbe67a14206d23d0974f37 765 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 766 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28 767 | Google-Mobile-Ads-SDK: ec897018b9ab9b447e7aa4876e7f75aba13ba2de 768 | GoogleAppMeasurement: dfe55efa543e899d906309eaaac6ca26d249862f 769 | GoogleDataTransport: a857c6a002d201b524dd4bc2ed7e7355ed07e785 770 | GoogleDataTransportCCTSupport: 32f75fbe904c82772fcbb6b6bd4525bfb6f2a862 771 | GoogleToolboxForMac: 800648f8b3127618c1b59c7f97684427630c5ea3 772 | GoogleUtilities: ad0f3b691c67909d03a3327cc205222ab8f42e0e 773 | "gRPC-C++": 9dfe7b44821e7b3e44aacad2af29d2c21f7cde83 774 | gRPC-Core: c9aef9a261a1247e881b18059b84d597293c9947 775 | GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925 776 | leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7 777 | nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd 778 | Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7 779 | RCTRequired: c639d59ed389cfb1f1203f65c2ea946d8ec586e2 780 | RCTTypeSafety: dc23fb655d6c77667c78e327bf661bc11e3b8aec 781 | React: 7e586e5d7bec12b91c1a096826b0fc9ab1da7865 782 | React-Core: 8ddb9770b4a30a6ab4a754e6ed5ec76454e3d699 783 | React-CoreModules: b3d9eece8ad7df36c917a41f05c1168c52fe0b34 784 | React-cxxreact: 1f972757c0bd08d962ef78068e06613c27489a3f 785 | React-jsi: 32285a21b1b24c36060493ed3057a34677d58d09 786 | React-jsiexecutor: 8909917ff7d8f21a57e443a866fd8d4560e50c65 787 | React-jsinspector: 111d7d342b07a904c400592e02a2b958f1098b60 788 | react-native-firebaseui: 75a2ca172da350af70b507411d82d2acfa340848 789 | React-RCTActionSheet: 89b037c0fb7d2671607cb645760164e7e0c013f6 790 | React-RCTAnimation: e3cefa93c38c004c318f7ec04b883eb14b8b8235 791 | React-RCTBlob: d26ac0e313fbf14e7203473fd593ccaaeee8329e 792 | React-RCTImage: 4bdd9588783fa9e48ef669ccd4f747224e208edf 793 | React-RCTLinking: 65f0088ff463babd3d5d567964a65b74141eff3b 794 | React-RCTNetwork: 0c1a73576c1cfeafe68396556de1b17d93c0c595 795 | React-RCTSettings: 4194f1f0edbddf3fd44d1714dc6578bb20379b60 796 | React-RCTText: e3ef6191cdb627855ff7fe8fa0c1e14094967fb8 797 | React-RCTVibration: fb54c732fd20405a76598e431aa2f8c2bf527de9 798 | ReactCommon: 5848032ed2f274fcb40f6b9ec24067787c42d479 799 | RNFirebase: 37daa9a346d070f9f6ee1f3b4aaf4c8e3b1d5d1c 800 | SDWebImage: 7edb9c3ea661e77a66661f7f044de8c1b55d1120 801 | Yoga: 14927e37bd25376d216b150ab2a561773d57911f 802 | 803 | PODFILE CHECKSUM: abaac88626a93f7f36a28a6ed6197c26f7cdf617 804 | 805 | COCOAPODS: 1.9.1 806 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample.xcodeproj/xcshareddata/xcschemes/ReactNativeFirebaseUIExample-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample.xcodeproj/xcshareddata/xcschemes/ReactNativeFirebaseUIExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample.xcworkspace:contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | [FIRApp configure]; 20 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 21 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 22 | moduleName:@"ReactNativeFirebaseUIExample" 23 | initialProperties:nil]; 24 | 25 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 26 | 27 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 28 | UIViewController *rootViewController = [UIViewController new]; 29 | rootViewController.view = rootView; 30 | self.window.rootViewController = rootViewController; 31 | [self.window makeKeyAndVisible]; 32 | return YES; 33 | } 34 | 35 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 36 | { 37 | #if DEBUG 38 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 39 | #else 40 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 41 | #endif 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ReactNativeFirebaseUIExample 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | GADApplicationIdentifier 26 | ca-app-pub-3940256099942544~1458002511 27 | LSRequiresIPhoneOS 28 | 29 | NSAppTransportSecurity 30 | 31 | NSAllowsArbitraryLoads 32 | 33 | NSExceptionDomains 34 | 35 | localhost 36 | 37 | NSExceptionAllowsInsecureHTTPLoads 38 | 39 | 40 | 41 | 42 | NSLocationWhenInUseUsageDescription 43 | 44 | UILaunchStoryboardName 45 | LaunchScreen 46 | UIRequiredDeviceCapabilities 47 | 48 | armv7 49 | 50 | UISupportedInterfaceOrientations 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | UIViewControllerBasedStatusBarAppearance 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExample/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/ReactNativeFirebaseUIExampleTests/ReactNativeFirebaseUIExampleTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define TIMEOUT_SECONDS 600 15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 16 | 17 | @interface ReactNativeFirebaseUIExampleTests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation ReactNativeFirebaseUIExampleTests 22 | 23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 24 | { 25 | if (test(view)) { 26 | return YES; 27 | } 28 | for (UIView *subview in [view subviews]) { 29 | if ([self findSubviewInView:subview matching:test]) { 30 | return YES; 31 | } 32 | } 33 | return NO; 34 | } 35 | 36 | - (void)testRendersWelcomeScreen 37 | { 38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 40 | BOOL foundElement = NO; 41 | 42 | __block NSString *redboxError = nil; 43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 44 | if (level >= RCTLogLevelError) { 45 | redboxError = message; 46 | } 47 | }); 48 | 49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 52 | 53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 55 | return YES; 56 | } 57 | return NO; 58 | }]; 59 | } 60 | 61 | RCTSetLogFunction(RCTDefaultLogFunction); 62 | 63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativeFirebaseUIExample", 3 | "version": "5.4.0", 4 | "private": true, 5 | "scripts": { 6 | "android-bundle": "ORG_GRADLE_PROJECT_bundleInDev=true npm run android", 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "apk": "cd android && ./gradlew assembleRelease", 10 | "rename": "node ./bin/rename.js", 11 | "start": "react-native start", 12 | "test": "jest", 13 | "lint": "eslint .", 14 | "postinstall": "npx jetify" 15 | }, 16 | "dependencies": { 17 | "jetifier": "^1.6.4", 18 | "react": "16.9.0", 19 | "react-native": "0.62.3", 20 | "react-native-firebase": "^5.5.6", 21 | "react-native-firebaseui": "file:../" 22 | }, 23 | "devDependencies": { 24 | "@babel/core": "^7.6.2", 25 | "@babel/runtime": "^7.6.2", 26 | "@react-native-community/eslint-config": "^0.0.5", 27 | "babel-jest": "^24.9.0", 28 | "eslint": "^6.5.1", 29 | "fs-extra": "^7.0.1", 30 | "jest": "^24.9.0", 31 | "metro-react-native-babel-preset": "^0.56.0", 32 | "react-test-renderer": "16.8.6", 33 | "replace-in-file": "^3.4.4" 34 | }, 35 | "jest": { 36 | "preset": "react-native" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | export * from './src/index'; 2 | -------------------------------------------------------------------------------- /ios/FirebaseUIImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FirebaseUIImageView.h 3 | // RNFirebaseUi 4 | // 5 | // Created by erez on 7/11/17. 6 | // Copyright © 2017 Rumors. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface FirebaseImageView : UIImageView 14 | 15 | @property (nonatomic, copy) NSString *path; 16 | @property (nonatomic, strong) NSNumber *timestamp; 17 | @property (nonatomic, assign) RCTResizeMode resizeMode; 18 | @property (nonatomic, strong) UIImage *defaultSource; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ios/FirebaseUIImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FirebaseUIImageView.h 3 | // RNFirebaseUi 4 | // 5 | // Created by erez on 7/11/17. 6 | // Copyright © 2017 Rumors. All rights reserved. 7 | // 8 | 9 | 10 | #import "FirebaseUIImageView.h" 11 | #import 12 | #import "UIImageView+FirebaseStorage.h" 13 | 14 | @implementation FirebaseImageView 15 | { 16 | BOOL _needsReload; 17 | } 18 | 19 | - (void)setPath:(NSString *)path 20 | { 21 | _path = path; 22 | 23 | _needsReload = YES; 24 | } 25 | 26 | - (void)setDefaultSource:(UIImage *)defaultSource 27 | { 28 | _defaultSource = defaultSource; 29 | 30 | _needsReload = YES; 31 | } 32 | 33 | -(void)setTimestamp:(NSNumber*)timestamp 34 | { 35 | _timestamp = timestamp; 36 | 37 | _needsReload = YES; 38 | } 39 | 40 | - (void)setResizeMode:(RCTResizeMode)resizeMode 41 | { 42 | if (_resizeMode != resizeMode) { 43 | _resizeMode = resizeMode; 44 | 45 | if (_resizeMode == RCTResizeModeRepeat) { 46 | // Repeat resize mode is handled by the UIImage. Use scale to fill 47 | // so the repeated image fills the UIImageView. 48 | self.contentMode = UIViewContentModeScaleToFill; 49 | } else { 50 | UIViewContentMode contentMode = (UIViewContentMode)resizeMode; 51 | self.contentMode = contentMode; 52 | self.clipsToBounds = true; 53 | } 54 | } 55 | } 56 | 57 | - (void)didSetProps:(NSArray *)changedProps 58 | { 59 | if (_needsReload) { 60 | [self reloadImage]; 61 | } 62 | } 63 | 64 | -(void)reloadImage 65 | { 66 | _needsReload = NO; 67 | // Reference to an image file in Firebase Storage 68 | FIRStorageReference *reference = [[FIRStorage storage] referenceWithPath:_path]; 69 | 70 | // Load the image using SDWebImage 71 | NSString* timestamp = [_timestamp stringValue]; 72 | [self sd_setImageWithStorageReference:reference placeholderImage:_defaultSource customKey:timestamp]; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /ios/RCTFirebaseImageViewManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNFirebaseImage.h 3 | // RNFirebaseUi 4 | // 5 | // Created by erez rokah on 7/11/17. 6 | // Copyright © 2017 Rumors. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RCTFirebaseImageViewManager : RCTViewManager 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/RCTFirebaseImageViewManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // RNFirebaseImage.m 3 | // RNFirebaseUi 4 | // 5 | // Created by erez rokah on 7/11/17. 6 | // Copyright © 2017 Rumors. All rights reserved. 7 | // 8 | 9 | 10 | #import "RCTFirebaseImageViewManager.h" 11 | #import "FirebaseUIImageView.h" 12 | 13 | @implementation RCTFirebaseImageViewManager 14 | 15 | RCT_EXPORT_MODULE() 16 | RCT_EXPORT_VIEW_PROPERTY(path, NSString) 17 | RCT_EXPORT_VIEW_PROPERTY(timestamp, NSNumber) 18 | RCT_EXPORT_VIEW_PROPERTY(resizeMode, RCTResizeMode) 19 | RCT_EXPORT_VIEW_PROPERTY(defaultSource, UIImage) 20 | 21 | - (UIView *)view 22 | { 23 | FirebaseImageView *imageView = [[FirebaseImageView alloc] init]; 24 | 25 | return imageView; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ios/RNFirebaseUi.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B3E7B58A1CC2AC0600A0062D /* RCTFirebaseImageViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RCTFirebaseImageViewManager.m */; }; 11 | BA04DF251F1506A800122A3C /* FirebaseUIImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = BA04DF241F1506A800122A3C /* FirebaseUIImageView.m */; }; 12 | BAC95E541FA3D2C400E33F4D /* UIImageView+FirebaseStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = BAC95E511FA3D2C300E33F4D /* UIImageView+FirebaseStorage.m */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXCopyFilesBuildPhase section */ 16 | 58B511D91A9E6C8500147676 /* CopyFiles */ = { 17 | isa = PBXCopyFilesBuildPhase; 18 | buildActionMask = 2147483647; 19 | dstPath = "include/$(PRODUCT_NAME)"; 20 | dstSubfolderSpec = 16; 21 | files = ( 22 | ); 23 | runOnlyForDeploymentPostprocessing = 0; 24 | }; 25 | /* End PBXCopyFilesBuildPhase section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | 134814201AA4EA6300B7C361 /* libRNFirebaseUi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFirebaseUi.a; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | B3E7B5891CC2AC0600A0062D /* RCTFirebaseImageViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTFirebaseImageViewManager.m; sourceTree = ""; }; 30 | BA04DF241F1506A800122A3C /* FirebaseUIImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FirebaseUIImageView.m; sourceTree = ""; }; 31 | BA04DF261F1506CE00122A3C /* FirebaseUIImageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirebaseUIImageView.h; sourceTree = ""; }; 32 | BA43A3101F14BB0300791965 /* RCTFirebaseImageViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTFirebaseImageViewManager.h; sourceTree = ""; }; 33 | BAC95E511FA3D2C300E33F4D /* UIImageView+FirebaseStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+FirebaseStorage.m"; sourceTree = ""; }; 34 | BAC95E531FA3D2C300E33F4D /* UIImageView+FirebaseStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+FirebaseStorage.h"; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 58B511D81A9E6C8500147676 /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | 134814211AA4EA7D00B7C361 /* Products */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 134814201AA4EA6300B7C361 /* libRNFirebaseUi.a */, 52 | ); 53 | name = Products; 54 | sourceTree = ""; 55 | }; 56 | 58B511D21A9E6C8500147676 = { 57 | isa = PBXGroup; 58 | children = ( 59 | BAC95E531FA3D2C300E33F4D /* UIImageView+FirebaseStorage.h */, 60 | BAC95E511FA3D2C300E33F4D /* UIImageView+FirebaseStorage.m */, 61 | BA04DF261F1506CE00122A3C /* FirebaseUIImageView.h */, 62 | BA04DF241F1506A800122A3C /* FirebaseUIImageView.m */, 63 | B3E7B5891CC2AC0600A0062D /* RCTFirebaseImageViewManager.m */, 64 | BA43A3101F14BB0300791965 /* RCTFirebaseImageViewManager.h */, 65 | 134814211AA4EA7D00B7C361 /* Products */, 66 | ); 67 | sourceTree = ""; 68 | }; 69 | /* End PBXGroup section */ 70 | 71 | /* Begin PBXNativeTarget section */ 72 | 58B511DA1A9E6C8500147676 /* RNFirebaseUi */ = { 73 | isa = PBXNativeTarget; 74 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNFirebaseUi" */; 75 | buildPhases = ( 76 | 58B511D71A9E6C8500147676 /* Sources */, 77 | 58B511D81A9E6C8500147676 /* Frameworks */, 78 | 58B511D91A9E6C8500147676 /* CopyFiles */, 79 | ); 80 | buildRules = ( 81 | ); 82 | dependencies = ( 83 | ); 84 | name = RNFirebaseUi; 85 | productName = RCTDataManager; 86 | productReference = 134814201AA4EA6300B7C361 /* libRNFirebaseUi.a */; 87 | productType = "com.apple.product-type.library.static"; 88 | }; 89 | /* End PBXNativeTarget section */ 90 | 91 | /* Begin PBXProject section */ 92 | 58B511D31A9E6C8500147676 /* Project object */ = { 93 | isa = PBXProject; 94 | attributes = { 95 | LastUpgradeCheck = 0610; 96 | ORGANIZATIONNAME = Facebook; 97 | TargetAttributes = { 98 | 58B511DA1A9E6C8500147676 = { 99 | CreatedOnToolsVersion = 6.1.1; 100 | }; 101 | }; 102 | }; 103 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNFirebaseUi" */; 104 | compatibilityVersion = "Xcode 3.2"; 105 | developmentRegion = English; 106 | hasScannedForEncodings = 0; 107 | knownRegions = ( 108 | en, 109 | ); 110 | mainGroup = 58B511D21A9E6C8500147676; 111 | productRefGroup = 58B511D21A9E6C8500147676; 112 | projectDirPath = ""; 113 | projectRoot = ""; 114 | targets = ( 115 | 58B511DA1A9E6C8500147676 /* RNFirebaseUi */, 116 | ); 117 | }; 118 | /* End PBXProject section */ 119 | 120 | /* Begin PBXSourcesBuildPhase section */ 121 | 58B511D71A9E6C8500147676 /* Sources */ = { 122 | isa = PBXSourcesBuildPhase; 123 | buildActionMask = 2147483647; 124 | files = ( 125 | B3E7B58A1CC2AC0600A0062D /* RCTFirebaseImageViewManager.m in Sources */, 126 | BA04DF251F1506A800122A3C /* FirebaseUIImageView.m in Sources */, 127 | BAC95E541FA3D2C400E33F4D /* UIImageView+FirebaseStorage.m in Sources */, 128 | ); 129 | runOnlyForDeploymentPostprocessing = 0; 130 | }; 131 | /* End PBXSourcesBuildPhase section */ 132 | 133 | /* Begin XCBuildConfiguration section */ 134 | 58B511ED1A9E6C8500147676 /* Debug */ = { 135 | isa = XCBuildConfiguration; 136 | buildSettings = { 137 | ALWAYS_SEARCH_USER_PATHS = NO; 138 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 139 | CLANG_CXX_LIBRARY = "libc++"; 140 | CLANG_ENABLE_MODULES = YES; 141 | CLANG_ENABLE_OBJC_ARC = YES; 142 | CLANG_WARN_BOOL_CONVERSION = YES; 143 | CLANG_WARN_CONSTANT_CONVERSION = YES; 144 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 145 | CLANG_WARN_EMPTY_BODY = YES; 146 | CLANG_WARN_ENUM_CONVERSION = YES; 147 | CLANG_WARN_INT_CONVERSION = YES; 148 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 149 | CLANG_WARN_UNREACHABLE_CODE = YES; 150 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 151 | COPY_PHASE_STRIP = NO; 152 | ENABLE_STRICT_OBJC_MSGSEND = YES; 153 | GCC_C_LANGUAGE_STANDARD = gnu99; 154 | GCC_DYNAMIC_NO_PIC = NO; 155 | GCC_OPTIMIZATION_LEVEL = 0; 156 | GCC_PREPROCESSOR_DEFINITIONS = ( 157 | "DEBUG=1", 158 | "$(inherited)", 159 | ); 160 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 161 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 162 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 163 | GCC_WARN_UNDECLARED_SELECTOR = YES; 164 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 165 | GCC_WARN_UNUSED_FUNCTION = YES; 166 | GCC_WARN_UNUSED_VARIABLE = YES; 167 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 168 | MTL_ENABLE_DEBUG_INFO = YES; 169 | ONLY_ACTIVE_ARCH = YES; 170 | SDKROOT = iphoneos; 171 | }; 172 | name = Debug; 173 | }; 174 | 58B511EE1A9E6C8500147676 /* Release */ = { 175 | isa = XCBuildConfiguration; 176 | buildSettings = { 177 | ALWAYS_SEARCH_USER_PATHS = NO; 178 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 179 | CLANG_CXX_LIBRARY = "libc++"; 180 | CLANG_ENABLE_MODULES = YES; 181 | CLANG_ENABLE_OBJC_ARC = YES; 182 | CLANG_WARN_BOOL_CONVERSION = YES; 183 | CLANG_WARN_CONSTANT_CONVERSION = YES; 184 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 185 | CLANG_WARN_EMPTY_BODY = YES; 186 | CLANG_WARN_ENUM_CONVERSION = YES; 187 | CLANG_WARN_INT_CONVERSION = YES; 188 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 189 | CLANG_WARN_UNREACHABLE_CODE = YES; 190 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 191 | COPY_PHASE_STRIP = YES; 192 | ENABLE_NS_ASSERTIONS = NO; 193 | ENABLE_STRICT_OBJC_MSGSEND = YES; 194 | GCC_C_LANGUAGE_STANDARD = gnu99; 195 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 196 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 197 | GCC_WARN_UNDECLARED_SELECTOR = YES; 198 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 199 | GCC_WARN_UNUSED_FUNCTION = YES; 200 | GCC_WARN_UNUSED_VARIABLE = YES; 201 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 202 | MTL_ENABLE_DEBUG_INFO = NO; 203 | SDKROOT = iphoneos; 204 | VALIDATE_PRODUCT = YES; 205 | }; 206 | name = Release; 207 | }; 208 | 58B511F01A9E6C8500147676 /* Debug */ = { 209 | isa = XCBuildConfiguration; 210 | buildSettings = { 211 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; 212 | HEADER_SEARCH_PATHS = ( 213 | "$(inherited)", 214 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 215 | "$(SRCROOT)/../../../React/**", 216 | "$(SRCROOT)/../../react-native/React/**", 217 | "${SRCROOT}/../../../ios/Pods/Headers/Public", 218 | ); 219 | OTHER_LDFLAGS = "-ObjC"; 220 | PRODUCT_NAME = RNFirebaseUi; 221 | SKIP_INSTALL = YES; 222 | }; 223 | name = Debug; 224 | }; 225 | 58B511F11A9E6C8500147676 /* Release */ = { 226 | isa = XCBuildConfiguration; 227 | buildSettings = { 228 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; 229 | HEADER_SEARCH_PATHS = ( 230 | "$(inherited)", 231 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 232 | "$(SRCROOT)/../../../React/**", 233 | "$(SRCROOT)/../../react-native/React/**", 234 | "${SRCROOT}/../../../ios/Pods/Headers/Public", 235 | ); 236 | OTHER_LDFLAGS = "-ObjC"; 237 | PRODUCT_NAME = RNFirebaseUi; 238 | SKIP_INSTALL = YES; 239 | }; 240 | name = Release; 241 | }; 242 | /* End XCBuildConfiguration section */ 243 | 244 | /* Begin XCConfigurationList section */ 245 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNFirebaseUi" */ = { 246 | isa = XCConfigurationList; 247 | buildConfigurations = ( 248 | 58B511ED1A9E6C8500147676 /* Debug */, 249 | 58B511EE1A9E6C8500147676 /* Release */, 250 | ); 251 | defaultConfigurationIsVisible = 0; 252 | defaultConfigurationName = Release; 253 | }; 254 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNFirebaseUi" */ = { 255 | isa = XCConfigurationList; 256 | buildConfigurations = ( 257 | 58B511F01A9E6C8500147676 /* Debug */, 258 | 58B511F11A9E6C8500147676 /* Release */, 259 | ); 260 | defaultConfigurationIsVisible = 0; 261 | defaultConfigurationName = Release; 262 | }; 263 | /* End XCConfigurationList section */ 264 | }; 265 | rootObject = 58B511D31A9E6C8500147676 /* Project object */; 266 | } 267 | -------------------------------------------------------------------------------- /ios/UIImageView+FirebaseStorage.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016 Google Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | @import UIKit; 18 | #import 19 | #import 20 | #import 21 | 22 | NS_ASSUME_NONNULL_BEGIN 23 | 24 | @interface UIImageView (FirebaseStorage) 25 | 26 | /** 27 | * Returns the maximum image download size, in bytes. Defaults to 10e6. 28 | */ 29 | + (UInt64)sd_defaultMaxImageSize; 30 | 31 | /** 32 | * Sets the maximum image download size, in bytes. 33 | * @param size The new maximum image download size. 34 | */ 35 | + (void)sd_setDefaultMaxImageSize:(UInt64)size; 36 | 37 | /** 38 | * The current download task, if the image view is downloading an image. 39 | * Must be invoked on the main queue. 40 | */ 41 | @property (nonatomic, readonly, nullable) FIRStorageDownloadTask *sd_currentDownloadTask; 42 | 43 | /** 44 | * Sets the image view's image to an image downloaded from the Firebase Storage reference. 45 | * 46 | * @param storageRef A Firebase Storage reference containing an image. 47 | * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image 48 | * could not be found in cache). 49 | */ 50 | - (nullable FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef; 51 | 52 | /** 53 | * Sets the image view's image to an image downloaded from the Firebase Storage reference. 54 | * Must be invoked on the main queue. 55 | * 56 | * @param storageRef A Firebase Storage reference containing an image. 57 | * @param customKey An custom caching key to append to the storage path. 58 | * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image 59 | * could not be found in cache). 60 | */ 61 | - (nullable FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 62 | placeholderImage:(nullable UIImage *)placeholder 63 | customKey:(NSString*)customKey; 64 | 65 | /** 66 | * Sets the image view's image to an image downloaded from the Firebase Storage reference. 67 | * Must be invoked on the main queue. 68 | * 69 | * @param storageRef A Firebase Storage reference containing an image. 70 | * @param placeholder An image to display while the download is in progress. 71 | * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image 72 | * could not be found in cache). 73 | */ 74 | - (nullable FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 75 | placeholderImage:(nullable UIImage *)placeholder; 76 | 77 | /** 78 | * Sets the image view's image to an image downloaded from the Firebase Storage reference. 79 | * Must be invoked on the main queue. 80 | * 81 | * @param storageRef A Firebase Storage reference containing an image. 82 | * @param placeholder An image to display while the download is in progress. 83 | * @param completion A closure to handle events when the image finishes downloading. 84 | * The closure is not guaranteed to be invoked on the main thread. 85 | * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image 86 | * could not be found in cache). 87 | */ 88 | - (nullable FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 89 | placeholderImage:(nullable UIImage *)placeholder 90 | completion:(void (^_Nullable)(UIImage *_Nullable, 91 | NSError *_Nullable, 92 | SDImageCacheType, 93 | FIRStorageReference *))completion; 94 | 95 | /** 96 | * Sets the image view's image to an image downloaded from the Firebase Storage reference. 97 | * Must be invoked on the main queue. 98 | * 99 | * @param storageRef A Firebase Storage reference containing an image. 100 | * @param size The maximum size of the downloaded image. If the downloaded image 101 | * exceeds this size, an error will be raised in the completion block. 102 | * @param placeholder An image to display while the download is in progress. 103 | * @param completion A closure to handle events when the image finishes downloading. 104 | * The closure is not guaranteed to be invoked on the main thread. 105 | * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image 106 | * could not be found in cache). 107 | */ 108 | - (nullable FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 109 | maxImageSize:(UInt64)size 110 | placeholderImage:(nullable UIImage *)placeholder 111 | completion:(void (^_Nullable)(UIImage *_Nullable, 112 | NSError *_Nullable, 113 | SDImageCacheType, 114 | FIRStorageReference *))completion; 115 | 116 | /** 117 | * Sets the image view's image to an image downloaded from the Firebase Storage reference. 118 | * Must be invoked on the main queue. 119 | * 120 | * @param storageRef A Firebase Storage reference containing an image. 121 | * @param size The maximum size of the downloaded image. If the downloaded image 122 | * exceeds this size, an error will be raised in the completion block. 123 | * @param placeholder An image to display while the download is in progress. 124 | * @param cache An image cache to check for images before downloading. 125 | * @param completion A closure to handle events when the image finishes downloading. 126 | * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image 127 | * could not be found in cache). 128 | */ 129 | - (nullable FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 130 | maxImageSize:(UInt64)size 131 | placeholderImage:(nullable UIImage *)placeholder 132 | cache:(nullable SDImageCache *)cache 133 | completion:(void (^_Nullable)(UIImage *_Nullable, 134 | NSError *_Nullable, 135 | SDImageCacheType, 136 | FIRStorageReference *))completion; 137 | 138 | /** 139 | * Sets the image view's image to an image downloaded from the Firebase Storage reference. 140 | * Must be invoked on the main queue. 141 | * 142 | * @param storageRef A Firebase Storage reference containing an image. 143 | * @param size The maximum size of the downloaded image. If the downloaded image 144 | * exceeds this size, an error will be raised in the completion block. 145 | * @param placeholder An image to display while the download is in progress. 146 | * @param cache An image cache to check for images before downloading. 147 | * @param completion A closure to handle events when the image finishes downloading. 148 | * @param customKey An custom caching key to append to the storage path. 149 | * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image 150 | * could not be found in cache). 151 | */ 152 | - (nullable FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 153 | maxImageSize:(UInt64)size 154 | placeholderImage:(nullable UIImage *)placeholder 155 | cache:(nullable SDImageCache *)cache 156 | completion:(void (^_Nullable)(UIImage *_Nullable, 157 | NSError *_Nullable, 158 | SDImageCacheType, 159 | FIRStorageReference *))completion 160 | customKey:(NSString*)customKey; 161 | 162 | @end 163 | 164 | NS_ASSUME_NONNULL_END 165 | -------------------------------------------------------------------------------- /ios/UIImageView+FirebaseStorage.m: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016 Google Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #import 18 | 19 | #import "UIImageView+FirebaseStorage.h" 20 | 21 | static UInt64 FUIMaxImageDownloadSize = 10e6; // 10MB 22 | 23 | @interface UIImageView (FirebaseStorage_Private) 24 | @property (nonatomic, readwrite, nullable, setter=sd_setCurrentDownloadTask:) FIRStorageDownloadTask *sd_currentDownloadTask; 25 | @end 26 | 27 | @implementation UIImageView (FirebaseStorage) 28 | 29 | + (UInt64)sd_defaultMaxImageSize { 30 | return FUIMaxImageDownloadSize; 31 | } 32 | 33 | + (void)sd_setDefaultMaxImageSize:(UInt64)size { 34 | FUIMaxImageDownloadSize = size; 35 | } 36 | 37 | - (FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef { 38 | return [self sd_setImageWithStorageReference:storageRef placeholderImage:nil completion:nil]; 39 | } 40 | 41 | - (FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 42 | placeholderImage:(nullable UIImage *)placeholder 43 | customKey:(NSString*)customKey { 44 | return [self sd_setImageWithStorageReference:storageRef 45 | maxImageSize:[UIImageView sd_defaultMaxImageSize] 46 | placeholderImage:placeholder 47 | cache:[SDImageCache sharedImageCache] 48 | completion:nil 49 | customKey:customKey]; 50 | } 51 | 52 | - (FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 53 | placeholderImage:(UIImage *)placeholder { 54 | return [self sd_setImageWithStorageReference:storageRef placeholderImage:placeholder completion:nil]; 55 | } 56 | 57 | - (FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 58 | placeholderImage:(UIImage *)placeholder 59 | completion:(void (^)(UIImage *_Nullable, 60 | NSError *_Nullable, 61 | SDImageCacheType, 62 | FIRStorageReference *))completion { 63 | return [self sd_setImageWithStorageReference:storageRef 64 | maxImageSize:[UIImageView sd_defaultMaxImageSize] 65 | placeholderImage:placeholder 66 | completion:completion]; 67 | } 68 | 69 | - (FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 70 | maxImageSize:(UInt64)size 71 | placeholderImage:(nullable UIImage *)placeholder 72 | completion:(void (^)(UIImage *, 73 | NSError *, 74 | SDImageCacheType, 75 | FIRStorageReference *))completion { 76 | return [self sd_setImageWithStorageReference:storageRef 77 | maxImageSize:size 78 | placeholderImage:placeholder 79 | cache:[SDImageCache sharedImageCache] 80 | completion:completion 81 | customKey:@""]; 82 | } 83 | 84 | - (FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 85 | maxImageSize:(UInt64)size 86 | placeholderImage:(nullable UIImage *)placeholder 87 | cache:(nullable SDImageCache *)cache 88 | completion:(void (^)(UIImage *, 89 | NSError *, 90 | SDImageCacheType, 91 | FIRStorageReference *))completion { 92 | return [self sd_setImageWithStorageReference:storageRef 93 | maxImageSize:size 94 | placeholderImage:placeholder 95 | cache:cache 96 | completion:completion 97 | customKey:@""]; 98 | } 99 | 100 | - (FIRStorageDownloadTask *)sd_setImageWithStorageReference:(FIRStorageReference *)storageRef 101 | maxImageSize:(UInt64)size 102 | placeholderImage:(nullable UIImage *)placeholder 103 | cache:(nullable SDImageCache *)cache 104 | completion:(void (^)(UIImage *, 105 | NSError *, 106 | SDImageCacheType, 107 | FIRStorageReference *))completion 108 | customKey:(NSString*)customKey { 109 | NSParameterAssert(storageRef != nil); 110 | 111 | // If there's already a download on this UIImageView, cancel it 112 | if (self.sd_currentDownloadTask != nil) { 113 | [self.sd_currentDownloadTask cancel]; 114 | self.sd_currentDownloadTask = nil; 115 | } 116 | 117 | // Set placeholder image 118 | self.image = placeholder; 119 | 120 | // Query cache for image before trying to download 121 | NSString *key = nil; 122 | if (customKey != nil) { 123 | key = [storageRef.fullPath stringByAppendingString:customKey]; 124 | } else { 125 | key = storageRef.fullPath; 126 | } 127 | UIImage *cached = nil; 128 | 129 | cached = [cache imageFromMemoryCacheForKey:key]; 130 | if (cached != nil) { 131 | self.image = cached; 132 | if (completion != nil) { 133 | completion(cached, nil, SDImageCacheTypeMemory, storageRef); 134 | } 135 | return nil; 136 | } 137 | 138 | cached = [cache imageFromDiskCacheForKey:key]; 139 | if (cached != nil) { 140 | self.image = cached; 141 | if (completion != nil) { 142 | completion(cached, nil, SDImageCacheTypeDisk, storageRef); 143 | } 144 | return nil; 145 | } 146 | 147 | // If nothing was found in cache, download the image from Firebase Storage 148 | FIRStorageDownloadTask * download = [storageRef dataWithMaxSize:size 149 | completion:^(NSData *_Nullable data, 150 | NSError *_Nullable error) { 151 | dispatch_async(dispatch_get_main_queue(), ^{ 152 | if (data != nil) { 153 | UIImage *image = [UIImage sd_imageWithData:data]; 154 | self.image = image; 155 | 156 | // Cache downloaded image 157 | [cache storeImage:image forKey:key completion:nil]; 158 | 159 | if (completion != nil) { 160 | completion(image, nil, SDImageCacheTypeNone, storageRef); 161 | } 162 | } else { 163 | if (completion != nil) { 164 | completion(nil, error, SDImageCacheTypeNone, storageRef); 165 | } 166 | } 167 | }); 168 | }]; 169 | self.sd_currentDownloadTask = download; 170 | return download; 171 | } 172 | 173 | #pragma mark - Accessors 174 | 175 | - (void)sd_setCurrentDownloadTask:(FIRStorageDownloadTask *)currentDownload { 176 | objc_setAssociatedObject(self, 177 | @selector(sd_currentDownloadTask), 178 | currentDownload, 179 | OBJC_ASSOCIATION_RETAIN_NONATOMIC); 180 | } 181 | 182 | - (FIRStorageDownloadTask *)sd_currentDownloadTask { 183 | return objc_getAssociatedObject(self, @selector(sd_currentDownloadTask)); 184 | } 185 | 186 | @end 187 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-firebaseui", 3 | "version": "0.3.0", 4 | "description": "React Native Firebase Bindings Based on FirebaseUI SDK", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/rmrs/react-native-firebaseui.git" 9 | }, 10 | "keywords": [ 11 | "react-native" 12 | ], 13 | "author": "Erez Rokah ", 14 | "license": "MIT", 15 | "peerDependencies": { 16 | "react-native": ">=0.40" 17 | }, 18 | "bugs": { 19 | "url": "https://github.com/rmrs/react-native-firebaseui/issues" 20 | }, 21 | "homepage": "https://github.com/rmrs/react-native-firebaseui#readme", 22 | "dependencies": { 23 | "prop-types": "^15.5.10" 24 | }, 25 | "scripts": { 26 | "tag": "git tag \"v$npm_package_version\" && git push --tags", 27 | "prepublishOnly": "yarn run tag" 28 | }, 29 | "devDependencies": { 30 | "prettier": "^1.19.1" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /react-native-firebaseui.podspec: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = package['name'] 7 | s.version = package['version'] 8 | s.summary = package['description'] 9 | s.license = package['license'] 10 | 11 | s.authors = package['author'] 12 | s.homepage = package['homepage'] 13 | s.platform = :ios, "9.0" 14 | 15 | s.source = { :git => "https://github.com/rmrs/react-native-firebaseui.git", :tag => "v#{s.version}" } 16 | s.source_files = "ios/**/*.{h,m}" 17 | 18 | s.dependency 'React' 19 | s.dependency 'FirebaseUI/Storage' 20 | end -------------------------------------------------------------------------------- /src/index.android.js: -------------------------------------------------------------------------------- 1 | // On Android, both Image and Photo view are supported, 2 | // and defaultSource is converted to a uri that the 3 | // native side can interpret 4 | import React, { Component } from 'react'; 5 | import { requireNativeComponent, Image, View, StyleSheet } from 'react-native'; 6 | import iface from './interface'; 7 | 8 | const RCTFirebaseImageView = requireNativeComponent( 9 | 'RCTFirebaseImageView', 10 | iface, 11 | ); 12 | const RCTFirebasePhotoView = requireNativeComponent( 13 | 'RCTFirebasePhotoView', 14 | iface, 15 | ); 16 | 17 | const styles = StyleSheet.create({ 18 | imageContainer: { 19 | overflow: 'hidden', 20 | }, 21 | }); 22 | 23 | class ImageView extends Component { 24 | render() { 25 | let { 26 | source, 27 | style, 28 | defaultSource, 29 | resizeMode, 30 | ...otherProps 31 | } = this.props; 32 | defaultSource = defaultSource 33 | ? Image.resolveAssetSource(defaultSource).uri 34 | : undefined; 35 | resizeMode = 36 | resizeMode || (style ? style.resizeMode : undefined) || 'cover'; 37 | return ( 38 | 39 | 45 | 46 | ); 47 | } 48 | } 49 | 50 | class PhotoView extends Component { 51 | render() { 52 | let { defaultSource, ...otherProps } = this.props; 53 | defaultSource = defaultSource 54 | ? Image.resolveAssetSource(defaultSource).uri 55 | : undefined; 56 | return ( 57 | 58 | ); 59 | } 60 | } 61 | 62 | module.exports = { ImageView, PhotoView }; 63 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import { requireNativeComponent } from 'react-native'; 2 | import iface from './interface'; 3 | 4 | const ImageView = requireNativeComponent('RCTFirebaseImageView', iface); 5 | const PhotoView = ImageView; //PhotoView is supported only on android 6 | 7 | module.exports = { ImageView, PhotoView }; 8 | -------------------------------------------------------------------------------- /src/interface.js: -------------------------------------------------------------------------------- 1 | import { Image } from 'react-native'; 2 | import PropTypes from 'prop-types'; 3 | 4 | module.exports = { 5 | name: 'FirebaseImage', 6 | propTypes: { 7 | ...Image.propTypes, 8 | path: PropTypes.string, 9 | timestamp: PropTypes.number, 10 | resizeMode: PropTypes.oneOf(['cover', 'contain', 'stretch', 'center']), 11 | defaultSource: PropTypes.number, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | asap@~2.0.3: 6 | version "2.0.5" 7 | resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" 8 | 9 | core-js@^1.0.0: 10 | version "1.2.7" 11 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" 12 | 13 | encoding@^0.1.11: 14 | version "0.1.12" 15 | resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" 16 | dependencies: 17 | iconv-lite "~0.4.13" 18 | 19 | fbjs@^0.8.9: 20 | version "0.8.12" 21 | resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" 22 | dependencies: 23 | core-js "^1.0.0" 24 | isomorphic-fetch "^2.1.1" 25 | loose-envify "^1.0.0" 26 | object-assign "^4.1.0" 27 | promise "^7.1.1" 28 | setimmediate "^1.0.5" 29 | ua-parser-js "^0.7.9" 30 | 31 | iconv-lite@~0.4.13: 32 | version "0.4.18" 33 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" 34 | 35 | is-stream@^1.0.1: 36 | version "1.1.0" 37 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 38 | 39 | isomorphic-fetch@^2.1.1: 40 | version "2.2.1" 41 | resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" 42 | dependencies: 43 | node-fetch "^1.0.1" 44 | whatwg-fetch ">=0.10.0" 45 | 46 | js-tokens@^3.0.0: 47 | version "3.0.2" 48 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" 49 | 50 | loose-envify@^1.0.0, loose-envify@^1.3.1: 51 | version "1.3.1" 52 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" 53 | dependencies: 54 | js-tokens "^3.0.0" 55 | 56 | node-fetch@^1.0.1: 57 | version "1.7.1" 58 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" 59 | dependencies: 60 | encoding "^0.1.11" 61 | is-stream "^1.0.1" 62 | 63 | object-assign@^4.1.0: 64 | version "4.1.1" 65 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 66 | 67 | prettier@^1.19.1: 68 | version "1.19.1" 69 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" 70 | integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== 71 | 72 | promise@^7.1.1: 73 | version "7.3.1" 74 | resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" 75 | dependencies: 76 | asap "~2.0.3" 77 | 78 | prop-types@^15.5.10: 79 | version "15.5.10" 80 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" 81 | dependencies: 82 | fbjs "^0.8.9" 83 | loose-envify "^1.3.1" 84 | 85 | setimmediate@^1.0.5: 86 | version "1.0.5" 87 | resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" 88 | 89 | ua-parser-js@^0.7.9: 90 | version "0.7.28" 91 | resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.28.tgz#8ba04e653f35ce210239c64661685bf9121dec31" 92 | integrity sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g== 93 | 94 | whatwg-fetch@>=0.10.0: 95 | version "2.0.3" 96 | resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" 97 | --------------------------------------------------------------------------------