Gathering detailed insights and metrics for @capacitor-community/firebase-crashlytics
Gathering detailed insights and metrics for @capacitor-community/firebase-crashlytics
Gathering detailed insights and metrics for @capacitor-community/firebase-crashlytics
Gathering detailed insights and metrics for @capacitor-community/firebase-crashlytics
npm install @capacitor-community/firebase-crashlytics
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
72 Stars
171 Commits
38 Forks
14 Watching
3 Branches
27 Contributors
Updated on 09 Oct 2024
Java (38.04%)
Swift (30.41%)
TypeScript (19.91%)
Objective-C (5.36%)
Ruby (4.36%)
JavaScript (1.92%)
Cumulative downloads
Total Downloads
Last day
-40.9%
243
Compared to previous day
Last week
6%
1,543
Compared to previous week
Last month
-17.8%
5,970
Compared to previous month
Last year
-9.6%
173,365
Compared to previous year
This project has been moved to the following monorepo: capawesome-team/capacitor-firebase.
@capacitor-community/firebase-crashlytics
Capacitor plugin for Firebase Crashlytics.
Maintainer | GitHub | Social |
---|---|---|
Robin Genz | robingenz | @robin_genz |
npm install @capacitor-community/firebase-crashlytics
npx cap sync
Add Firebase to your project if you haven't already (Android / iOS).
See Add the Firebase Crashlytics plugin to your app and follow the instructions to set up your app correctly.
This plugin will use the following project variables (defined in your app’s variables.gradle
file):
$firebaseCrashlyticsVersion
version of com.google.firebase:firebase-crashlytics
(default: 18.2.8
)See Set up Xcode to automatically upload dSYM files and follow the instructions to set up Xcode correctly.
Attention: The path used in section 4.c
of the guide should be:
1"${PODS_ROOT}/FirebaseCrashlytics/run"
No configuration required for this plugin.
A working example can be found here: robingenz/capacitor-firebase-plugin-demo
1import { FirebaseCrashlytics } from '@capacitor-community/firebase-crashlytics'; 2 3const crash = async () => { 4 await FirebaseCrashlytics.crash({ message: 'Test' }); 5}; 6 7const setContext = async () => { 8 await FirebaseCrashlytics.setContext({ 9 key: 'page', 10 value: 'home', 11 type: 'string' 12 }); 13}; 14 15const setUserId = async () => { 16 await FirebaseCrashlytics.setUserId({ 17 userId: '123' 18 }); 19}; 20 21const addLogMessage = async () => { 22 await FirebaseCrashlytics.addLogMessage({ 23 message: 'Test' 24 }); 25}; 26 27const setEnabled = async () => { 28 await FirebaseCrashlytics.setEnabled({ 29 enabled: true, 30 }); 31}; 32 33const isEnabled = async () => { 34 const result = await FirebaseCrashlytics.isEnabled(); 35 return result.enabled; 36}; 37 38const didCrashDuringPreviousExecution = async () => { 39 const result = await FirebaseCrashlytics.didCrashDuringPreviousExecution(); 40 return result.crashed; 41}; 42 43const sendUnsentReports = async () => { 44 await FirebaseCrashlytics.sendUnsentReports(); 45}; 46 47const deleteUnsentReports = async () => { 48 await FirebaseCrashlytics.deleteUnsentReports(); 49}; 50 51const recordException = async () => { 52 await FirebaseCrashlytics.recordException({ 53 message: 'This is a non-fatal message.' 54 }); 55}; 56 57import * as StackTrace from 'stacktrace-js'; 58 59const recordExceptionWithStacktrace = async (error: Error) => { 60 const stacktrace = await StackTrace.fromError(error); 61 await FirebaseCrashlytics.recordException({ 62 message: 'This is a non-fatal message.', 63 stacktrace 64 }); 65};
1crash(options: { message: string; }) => Promise<void>
Forces a crash to test the implementation.
Only available for Android and iOS.
Param | Type |
---|---|
options | { message: string; } |
1setContext(options: ContextOptions) => Promise<void>
Sets a custom key and value that is associated with subsequent fatal and non-fatal reports.
Only available for Android and iOS.
Param | Type |
---|---|
options | ContextOptions |
1setUserId(options: { userId: string; }) => Promise<void>
Sets a user ID (identifier) that is associated with subsequent fatal and non-fatal reports.
Only available for Android and iOS.
Param | Type |
---|---|
options | { userId: string; } |
1addLogMessage(options: { message: string; }) => Promise<void>
Adds a log message that is sent with your crash data. Only visible in the Crashlytics dashboard.
Only available for Android and iOS.
Param | Type |
---|---|
options | { message: string; } |
1setEnabled(options: { enabled: boolean; }) => Promise<void>
Enables/disables automatic data collection. The value does not apply until the next run of the app.
Only available for Android and iOS.
Param | Type |
---|---|
options | { enabled: boolean; } |
1isEnabled() => Promise<{ enabled: boolean; }>
Returns whether or not automatic data collection is enabled.
Only available for iOS.
Returns: Promise<{ enabled: boolean; }>
1didCrashDuringPreviousExecution() => Promise<{ crashed: boolean; }>
Returns whether the app crashed during the previous execution.
Only available for Android and iOS.
Returns: Promise<{ crashed: boolean; }>
1sendUnsentReports() => Promise<void>
Uploads any unsent reports to Crashlytics. When automatic data collection is enabled, Crashlytics automatically uploads reports at startup.
Only available for Android and iOS.
1deleteUnsentReports() => Promise<void>
Deletes any unsent reports on the device.
Only available for Android and iOS.
1recordException(options: RecordExceptionOptions) => Promise<void>
Records a non-fatal report to send to Crashlytics.
Only available for Android and iOS.
Param | Type |
---|---|
options | RecordExceptionOptions |
Prop | Type |
---|---|
key | string |
value | string | number | boolean |
type | 'string' | 'boolean' | 'long' | 'double' | 'int' | 'float' |
Prop | Type | Description |
---|---|---|
message | string | |
code | number | Error code within a specific error domain. This option is ignored when stacktrace is provided. Only available for iOS. |
domain | string | A string containing the error domain. This option is ignored when stacktrace is provided. Only available for iOS. |
stacktrace | StackFrame[] | A stacktrace generated by stacktrace.js . Cannot be combined with code and domain . |
Subset of the Stacktrace generated by stacktrace.js
.
Prop | Type |
---|---|
lineNumber | number |
fileName | string |
functionName | string |
Here you can find more information on how to test the Firebase Crashlytics implementation. Among other things, you will find information on how to correctly adjust the project's debug settings under iOS and how to test it out.
If you get obfuscated crash reports for iOS, make sure you have initialized Crashlytics correctly and take a look at this guide, which provides some ways to troubleshoot if Crashlytics can't find your app's dSYM.
See CHANGELOG.md.
See LICENSE.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
6 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/19 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More