{"id":13514829,"url":"https://github.com/capacitor-community/firebase-crashlytics","last_synced_at":"2025-04-06T18:14:23.253Z","repository":{"id":38284644,"uuid":"196321333","full_name":"capacitor-community/firebase-crashlytics","owner":"capacitor-community","description":"⚡️ Capacitor plugin for Firebase Crashlytics.","archived":false,"fork":false,"pushed_at":"2024-06-16T20:29:21.000Z","size":859,"stargazers_count":74,"open_issues_count":1,"forks_count":38,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-02T12:18:24.481Z","etag":null,"topics":["android","capacitor","capacitor-community","crashlytics","firebase","firebase-crashlytics","ios"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capacitor-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-11T04:45:03.000Z","updated_at":"2025-02-05T08:44:03.000Z","dependencies_parsed_at":"2024-01-02T23:09:24.841Z","dependency_job_id":"5db45cb2-f459-43ee-bc24-14a74095facf","html_url":"https://github.com/capacitor-community/firebase-crashlytics","commit_stats":{"total_commits":153,"total_committers":13,"mean_commits":11.76923076923077,"dds":0.5555555555555556,"last_synced_commit":"656cd51ddea7ddc36f290d7001d94683f70ef357"},"previous_names":["stewwan/capacitor-crashlytics"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ffirebase-crashlytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ffirebase-crashlytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ffirebase-crashlytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ffirebase-crashlytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capacitor-community","download_url":"https://codeload.github.com/capacitor-community/firebase-crashlytics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526762,"owners_count":20953143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","capacitor","capacitor-community","crashlytics","firebase","firebase-crashlytics","ios"],"created_at":"2024-08-01T05:01:02.384Z","updated_at":"2025-04-06T18:14:23.224Z","avatar_url":"https://github.com/capacitor-community.png","language":"Java","funding_links":[],"categories":["Java","Plugins","Community plugins"],"sub_categories":["Community Plugins"],"readme":"## ⚠️ Deprecated repository\n\n**This project has been moved to the following monorepo: [capawesome-team/capacitor-firebase](https://github.com/capawesome-team/capacitor-firebase).**\n\n-----\n\n\u003cp align=\"center\"\u003e\u003cbr\u003e\u003cimg src=\"https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png\" width=\"128\" height=\"128\" /\u003e\u003c/p\u003e\n\u003ch3 align=\"center\"\u003eFirebase Crashlytics\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\u003cstrong\u003e\u003ccode\u003e@capacitor-community/firebase-crashlytics\u003c/code\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Capacitor plugin for \u003ca href=\"https://firebase.google.com/docs/crashlytics\"\u003eFirebase Crashlytics\u003c/a\u003e.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/maintenance/yes/2023?style=flat-square\" /\u003e\n  \u003ca href=\"https://github.com/capacitor-community/firebase-crashlytics/actions?query=workflow%3A%22CI%22\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/capacitor-community/firebase-crashlytics/ci.yml?branch=master\u0026style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/firebase-crashlytics\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@capacitor-community/firebase-crashlytics?style=flat-square\" /\u003e\u003c/a\u003e\n\u003cbr\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/firebase-crashlytics\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@capacitor-community/firebase-crashlytics?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/firebase-crashlytics\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@capacitor-community/firebase-crashlytics?style=flat-square\" /\u003e\u003c/a\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\u003ca href=\"#contributors-\"\u003e\u003cimg src=\"https://img.shields.io/badge/all%20contributors-1-orange?style=flat-square\" /\u003e\u003c/a\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\u003c/p\u003e\n\n## Maintainers\n\n| Maintainer | GitHub                                    | Social                                        |\n| ---------- | ----------------------------------------- | --------------------------------------------- |\n| Robin Genz | [robingenz](https://github.com/robingenz) | [@robin_genz](https://twitter.com/robin_genz) |\n\n## Installation\n\n```\nnpm install @capacitor-community/firebase-crashlytics\nnpx cap sync\n```\n\nAdd Firebase to your project if you haven't already ([Android](https://firebase.google.com/docs/android/setup) / [iOS](https://firebase.google.com/docs/ios/setup)).\n\n### Android\n\nSee [Add the Firebase Crashlytics plugin to your app](https://firebase.google.com/docs/crashlytics/get-started?platform=android#add-plugin) and follow the instructions to set up your app correctly.\n\n#### Variables\n\nThis plugin will use the following project variables (defined in your app’s `variables.gradle` file):\n- `$firebaseCrashlyticsVersion` version of `com.google.firebase:firebase-crashlytics` (default: `18.2.8`)\n\n### iOS\n\nSee [Set up Xcode to automatically upload dSYM files](https://firebase.google.com/docs/crashlytics/get-started?platform=ios#set-up-dsym-uploading) and follow the instructions to set up Xcode correctly.  \n**Attention**: The path used in section `4.c` of the guide should be:\n\n```shell\n\"${PODS_ROOT}/FirebaseCrashlytics/run\"\n```\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Demo\n\nA working example can be found here: [robingenz/capacitor-firebase-plugin-demo](https://github.com/robingenz/capacitor-firebase-plugin-demo)\n\n## Usage\n\n```typescript\nimport { FirebaseCrashlytics } from '@capacitor-community/firebase-crashlytics';\n\nconst crash = async () =\u003e {\n  await FirebaseCrashlytics.crash({ message: 'Test' });\n};\n\nconst setContext = async () =\u003e {\n  await FirebaseCrashlytics.setContext({ \n    key: 'page',\n    value: 'home',\n    type: 'string'\n  });\n};\n\nconst setUserId = async () =\u003e {\n  await FirebaseCrashlytics.setUserId({\n    userId: '123'\n  });\n};\n\nconst addLogMessage = async () =\u003e {\n  await FirebaseCrashlytics.addLogMessage({\n    message: 'Test'\n  });\n};\n\nconst setEnabled = async () =\u003e {\n  await FirebaseCrashlytics.setEnabled({\n    enabled: true,\n  });\n};\n\nconst isEnabled = async () =\u003e {\n  const result = await FirebaseCrashlytics.isEnabled();\n  return result.enabled;\n};\n\nconst didCrashDuringPreviousExecution = async () =\u003e {\n  const result = await FirebaseCrashlytics.didCrashDuringPreviousExecution();\n  return result.crashed;\n};\n\nconst sendUnsentReports = async () =\u003e {\n  await FirebaseCrashlytics.sendUnsentReports();\n};\n\nconst deleteUnsentReports = async () =\u003e {\n  await FirebaseCrashlytics.deleteUnsentReports();\n};\n\nconst recordException = async () =\u003e {\n  await FirebaseCrashlytics.recordException({\n    message: 'This is a non-fatal message.'\n  });\n};\n\nimport * as StackTrace from 'stacktrace-js';\n\nconst recordExceptionWithStacktrace = async (error: Error) =\u003e {\n    const stacktrace = await StackTrace.fromError(error);\n    await FirebaseCrashlytics.recordException({\n        message: 'This is a non-fatal message.',\n        stacktrace\n    });\n};\n```\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`crash(...)`](#crash)\n* [`setContext(...)`](#setcontext)\n* [`setUserId(...)`](#setuserid)\n* [`addLogMessage(...)`](#addlogmessage)\n* [`setEnabled(...)`](#setenabled)\n* [`isEnabled()`](#isenabled)\n* [`didCrashDuringPreviousExecution()`](#didcrashduringpreviousexecution)\n* [`sendUnsentReports()`](#sendunsentreports)\n* [`deleteUnsentReports()`](#deleteunsentreports)\n* [`recordException(...)`](#recordexception)\n* [Interfaces](#interfaces)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\n### crash(...)\n\n```typescript\ncrash(options: { message: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nForces a crash to test the implementation.\n\nOnly available for Android and iOS.\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | \u003ccode\u003e{ message: string; }\u003c/code\u003e |\n\n--------------------\n\n\n### setContext(...)\n\n```typescript\nsetContext(options: ContextOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nSets a custom key and value that is associated with subsequent fatal and non-fatal reports.\n\nOnly available for Android and iOS.\n\n| Param         | Type                                                      |\n| ------------- | --------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#contextoptions\"\u003eContextOptions\u003c/a\u003e\u003c/code\u003e |\n\n--------------------\n\n\n### setUserId(...)\n\n```typescript\nsetUserId(options: { userId: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nSets a user ID (identifier) that is associated with subsequent fatal and non-fatal reports.\n\nOnly available for Android and iOS.\n\n| Param         | Type                             |\n| ------------- | -------------------------------- |\n| **`options`** | \u003ccode\u003e{ userId: string; }\u003c/code\u003e |\n\n--------------------\n\n\n### addLogMessage(...)\n\n```typescript\naddLogMessage(options: { message: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nAdds a log message that is sent with your crash data.\nOnly visible in the Crashlytics dashboard.\n\nOnly available for Android and iOS.\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | \u003ccode\u003e{ message: string; }\u003c/code\u003e |\n\n--------------------\n\n\n### setEnabled(...)\n\n```typescript\nsetEnabled(options: { enabled: boolean; }) =\u003e Promise\u003cvoid\u003e\n```\n\nEnables/disables automatic data collection.\nThe value does not apply until the next run of the app.\n\nOnly available for Android and iOS.\n\n| Param         | Type                               |\n| ------------- | ---------------------------------- |\n| **`options`** | \u003ccode\u003e{ enabled: boolean; }\u003c/code\u003e |\n\n--------------------\n\n\n### isEnabled()\n\n```typescript\nisEnabled() =\u003e Promise\u003c{ enabled: boolean; }\u003e\n```\n\nReturns whether or not automatic data collection is enabled.\n\nOnly available for iOS.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ enabled: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### didCrashDuringPreviousExecution()\n\n```typescript\ndidCrashDuringPreviousExecution() =\u003e Promise\u003c{ crashed: boolean; }\u003e\n```\n\nReturns whether the app crashed during the previous execution.\n\nOnly available for Android and iOS.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ crashed: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### sendUnsentReports()\n\n```typescript\nsendUnsentReports() =\u003e Promise\u003cvoid\u003e\n```\n\nUploads any unsent reports to Crashlytics.\nWhen automatic data collection is enabled, Crashlytics automatically uploads reports at startup.\n\nOnly available for Android and iOS.\n\n--------------------\n\n\n### deleteUnsentReports()\n\n```typescript\ndeleteUnsentReports() =\u003e Promise\u003cvoid\u003e\n```\n\nDeletes any unsent reports on the device.\n\nOnly available for Android and iOS.\n\n--------------------\n\n\n### recordException(...)\n\n```typescript\nrecordException(options: RecordExceptionOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nRecords a non-fatal report to send to Crashlytics.\n\nOnly available for Android and iOS.\n\n| Param         | Type                                                                      |\n| ------------- | ------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#recordexceptionoptions\"\u003eRecordExceptionOptions\u003c/a\u003e\u003c/code\u003e |\n\n--------------------\n\n\n### Interfaces\n\n\n#### ContextOptions\n\n| Prop        | Type                                                                         |\n| ----------- | ---------------------------------------------------------------------------- |\n| **`key`**   | \u003ccode\u003estring\u003c/code\u003e                                                          |\n| **`value`** | \u003ccode\u003estring \\| number \\| boolean\u003c/code\u003e                                     |\n| **`type`**  | \u003ccode\u003e'string' \\| 'boolean' \\| 'long' \\| 'double' \\| 'int' \\| 'float'\u003c/code\u003e |\n\n\n#### RecordExceptionOptions\n\n| Prop             | Type                      | Description                                                                                                              |\n| ---------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| **`message`**    | \u003ccode\u003estring\u003c/code\u003e       |                                                                                                                          |\n| **`code`**       | \u003ccode\u003enumber\u003c/code\u003e       | Error code within a specific error domain. This option is ignored when `stacktrace` is provided. Only available for iOS. |\n| **`domain`**     | \u003ccode\u003estring\u003c/code\u003e       | A string containing the error domain. This option is ignored when `stacktrace` is provided. Only available for iOS.      |\n| **`stacktrace`** | \u003ccode\u003eStackFrame[]\u003c/code\u003e | A stacktrace generated by `stacktrace.js`. Cannot be combined with `code` and `domain`.                                  |\n\n\n#### StackFrame\n\nSubset of the Stacktrace generated by `stacktrace.js`.\n\n| Prop               | Type                |\n| ------------------ | ------------------- |\n| **`lineNumber`**   | \u003ccode\u003enumber\u003c/code\u003e |\n| **`fileName`**     | \u003ccode\u003estring\u003c/code\u003e |\n| **`functionName`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\u003c/docgen-api\u003e\n\n## Test your implementation\n\n[Here](https://firebase.google.com/docs/crashlytics/force-a-crash) you can find more information on how to test the Firebase Crashlytics implementation.\nAmong other things, you will find information on how to correctly [adjust the project's debug settings](https://firebase.google.com/docs/crashlytics/force-a-crash?platform=ios#adjust_your_projects_debug_settings) under iOS and how to [test it out](https://firebase.google.com/docs/crashlytics/force-a-crash?platform=ios#test_it_out).\n\nIf you get obfuscated crash reports for iOS, make sure you have [initialized Crashlytics](https://firebase.google.com/docs/crashlytics/get-started?platform=ios#initialize-crashlytics) correctly and take a look at [this guide](https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=ios), which provides some ways to troubleshoot if Crashlytics can't find your app's dSYM.\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capacitor-community/firebase-crashlytics/blob/master/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capacitor-community/firebase-crashlytics/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitor-community%2Ffirebase-crashlytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapacitor-community%2Ffirebase-crashlytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitor-community%2Ffirebase-crashlytics/lists"}