Socket
Book a DemoInstallSign in
Socket

react-native-firebaseui

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-firebaseui

React Native Firebase Bindings Based on FirebaseUI SDK

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
3
-50%
Maintainers
3
Weekly downloads
 
Created
Source

react-native-firebaseui

Requirements

We assume you already have firebase sdk installed and configured. We're using this great library: react-native-firebase

Getting started

$ npm install react-native-firebaseui --save

Mostly automatic installation

$ react-native link react-native-firebaseui

For iOS add the following pod to your podfile:

pod 'SDWebImage', '~> 4.0'

and run pod install.

Android Additional step for PhotoView Library

Add this in your root build.gradle file (usually under android/build.gradle):

allprojects {
  repositories {
    ...
    maven { url "https://jitpack.io" }
  }
}

Manual installation

iOS

  • In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  • Go to node_modulesreact-native-firebase-ui and add RNFirebaseUi.xcodeproj
  • In XCode, in the project navigator, select your project. Add libRNFirebaseUi.a to your project's Build PhasesLink Binary With Libraries
  • Run your project (Cmd+R)<

Android

  • Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import io.rumors.reactnativefirebaseui.RNFirebaseUiPackage; to the imports at the top of the file
  • Add new RNFirebaseUiPackage() to the list returned by the getPackages() method
  • Append the following lines to android/settings.gradle:
include ':react-native-firebase-ui'
project(':react-native-firebase-ui').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-ui/android')
  • Insert the following lines inside the dependencies block in android/app/build.gradle:
  compile project(':react-native-firebase-ui')

Usage

import { ImageView, PhotoView } from 'react-native-firebaseui';

//no zoom support
export class MyFirebaseImageView extends Component<void, void, void> {
  constructor(props) {
    super(props);
  }

  render() {
    let imageProps = this.props;

    return (
      <ImageView
        {...imageProps}
        path="firebase/storage/path"
        defaultSource={require('./placeholder.png')} // optional, show placeholder until image is loaded
        timestamp={0} //optional, can be used to specify last modified time for same storage path
        resizeMode="cover" //'cover', 'contain', 'stretch', 'center'
      />
    );
  }
}

//zoom support (android only). On iOS just wrap the ImageView with a scroll view
export class MyFirebasePhotoView extends Component<void, void, void> {
  constructor(props) {
    super(props);
  }

  render() {
    let imageProps = this.props;

    return (
      <PhotoView
        {...imageProps}
        path="firebase/storage/path"
        defaultSource={require('./placeholder.png')} // optional, show placeholder until image is loaded
        timestamp={0} //optional, can be used to specify last modified time for same storage path
        resizeMode="cover" //'cover', 'contain', 'stretch', 'center'
      />
    );
  }
}

Note: On Android, the defaultSource prop is ignored on debug builds.

Keywords

react-native

FAQs

Package last updated on 14 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.