
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
react-native-firebase-crash-report
Advanced tools
React Native Firebase Crash Report With Custom Log
import FirebaseCrash from 'react-native-firebase-crash-report';
/*
* Create custom log messages that will be included in the crash report
*/
FirebaseCrash.log('User logged in');
/*
* Create custom log messages that will be included in the crash report and output to logcat/NSLog
*/
FirebaseCrash.logcat('User logged in');
// Android only
// Params:
// - message: string, required
// - debug level: int, optional, default 3 (https://developer.android.com/reference/android/util/Log.html)
// - tag: string, optional, default 'RNFirebaseCrashReport'
FirebaseCrash.logcat('User logged in', 3, 'MyTag');
/*
* Android only
* Report errors on demand
*/
FirebaseCrash.report('A weird thing just happened...');
npm install --save react-native-firebase-crash-report
rnpm link react-native-firebase-crash-report
For more information please visit Set Up Crash Reporting For iOS
If you are using RN < 0.29 you would have run into this problem, just follow the PR to fix it manually.
cd <your_project>/ios
Note: You can skip this step if you have pod initialised already.
pod init
pod 'Firebase/Core'
and pod 'Firebase/Crash'
to Podfile
target 'YourProject' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for YourProject
+ pod 'Firebase/Core'
+ pod 'Firebase/Crash'
target 'YourProjectTests' do
inherit! :search_paths
# Pods for testing
end
end
pod install
Add following code in your AppDelegate.m
#import "AppDelegate.h"
#import "RCTRootView.h"
+@import Firebase;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
+
+ // Use Firebase library to configure APIs
+ [FIRApp configure];
+
return YES;
}
For more information please visit Set Up Crash Reporting For Android
android/build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'de.undercouch:gradle-download-task:2.0.0'
+ classpath 'com.google.gms:google-services:3.0.0'
android/app/build.gradle
, add this line at the bottom of the fileapply plugin: 'com.google.gms.google-services'
Any pull requests, issue reports and suggestion are highly welcome.
ISC License (functionality equivalent to MIT License)
FAQs
React Native Firebase Crash Report
The npm package react-native-firebase-crash-report receives a total of 6 weekly downloads. As such, react-native-firebase-crash-report popularity was classified as not popular.
We found that react-native-firebase-crash-report demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.