
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
react-native-firebaseui
Advanced tools
We assume you already have firebase sdk installed and configured. We're using this great library: react-native-firebase
$ npm install react-native-firebaseui --save
$ react-native link react-native-firebaseui
For iOS add the following pod to your podfile:
pod 'SDWebImage', '~> 4.0'
and run pod install.
Add this in your root build.gradle file (usually under android/build.gradle
):
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-firebase-ui
and add RNFirebaseUi.xcodeproj
libRNFirebaseUi.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainApplication.java
import io.rumors.reactnativefirebaseui.RNFirebaseUiPackage;
to the imports at the top of the filenew RNFirebaseUiPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:include ':react-native-firebase-ui'
project(':react-native-firebase-ui').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-ui/android')
android/app/build.gradle
: compile project(':react-native-firebase-ui')
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.
FAQs
React Native Firebase Bindings Based on FirebaseUI SDK
The npm package react-native-firebaseui receives a total of 3 weekly downloads. As such, react-native-firebaseui popularity was classified as not popular.
We found that react-native-firebaseui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.