{"id":32305391,"url":"https://github.com/kiwi-bop/flutter_crashlytics","last_synced_at":"2025-10-23T06:50:52.111Z","repository":{"id":56829269,"uuid":"145524259","full_name":"kiwi-bop/flutter_crashlytics","owner":"kiwi-bop","description":":package: Flutter plugin for Crashlytics integration","archived":false,"fork":false,"pushed_at":"2019-10-23T13:29:07.000Z","size":247,"stargazers_count":194,"open_issues_count":19,"forks_count":46,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-19T00:30:03.026Z","etag":null,"topics":["crash-reporting","crashlytics","flutter","flutter-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiwi-bop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-21T07:28:29.000Z","updated_at":"2024-04-23T04:25:09.000Z","dependencies_parsed_at":"2022-08-26T13:51:19.264Z","dependency_job_id":null,"html_url":"https://github.com/kiwi-bop/flutter_crashlytics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kiwi-bop/flutter_crashlytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi-bop%2Fflutter_crashlytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi-bop%2Fflutter_crashlytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi-bop%2Fflutter_crashlytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi-bop%2Fflutter_crashlytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiwi-bop","download_url":"https://codeload.github.com/kiwi-bop/flutter_crashlytics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi-bop%2Fflutter_crashlytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280577134,"owners_count":26354072,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["crash-reporting","crashlytics","flutter","flutter-plugin"],"created_at":"2025-10-23T06:50:49.390Z","updated_at":"2025-10-23T06:50:52.103Z","avatar_url":"https://github.com/kiwi-bop.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_crashlytics\n\n[![pub package](https://img.shields.io/pub/v/flutter_crashlytics.svg)](https://pub.dartlang.org/packages/flutter_crashlytics)\n\nFlutter plugin to enable Crashlytics reporting.\n\n## Setup\n\n### Firebase Crashlytics\n\nIf you're using Firebase instead of Fabric, you must first setup your app to use Firebase as per this tutorial.\nhttps://codelabs.developers.google.com/codelabs/flutter-firebase/#4\n\nThe instructions are the same for Fabric and Firebase, except that for Firebase, you don't get an API key so you don't have to add it anywhere.\n\n### Android\nTo setup Crashlytics on Android side, you need to set the Fabric ID in your manifest like this: \n(Only do this if using Fabric, not Firebase as you will not have an API Key)\n```\n \u003cmeta-data\n            android:name=\"io.fabric.ApiKey\"\n            android:value=\"YOUR_ID_HERE\" /\u003e\n```\n\nYou also need to change your build.gradle file like this: \n\n```\nbuildscript {\n    repositories {\n        ...\n        maven { url 'https://maven.fabric.io/public' }\n    }\n\n    dependencies {\n        classpath 'io.fabric.tools:gradle:1.+'\n        ...\n    }\n}\n```\n\nAnd apply the fabric plugin `apply plugin: 'io.fabric'` \n\nNothing more.\n\n### Symbolicating Native Android Crashes\nUnfortunately, even pure Dart projects can't always protect you from native\ncrashes. Without the following setup, a native crash like SIGSEGV will\nappear as a blank stacktrace in Crashlytics. Here's how to get some symbols:\n\nAdd the following to build.gradle, after `apply plugin: 'io.fabric'`:\n\n```\ncrashlytics {\n    enableNdk true\n    androidNdkOut \"../../debugSymbols\"\n    androidNdkLibsOut \"../../build/app/intermediates/transforms/stripDebugSymbol/release/0/lib\"\n}\n```\n\nEnsure that the NDK bundle is installed or the stripDebugSymbol directory won't\nget created.\n\nNow setup a release script to populate the debugSymbols directory, guided by\nthe instructions from https://github.com/flutter/flutter/wiki/Crashes\n\n```\n# Build our app like usual\nflutter -v build apk --release\n\n### BEGIN MODIFICATIONS\n\n# Copy mergeJniLibs to debugSymbols\ncp -R ./build/app/intermediates/transforms/mergeJniLibs/release/0/lib debugSymbols\n\n# The libflutter.so here is the same as in the artifacts.zip found with symbols.zip\ncd debugSymbols/armeabi-v7a\n\n# Download the corresponding libflutter.so with debug symbols\nENGINE_VERSION=`cat $HOME/flutter/bin/internal/engine.version`\ngsutil cp gs://flutter_infra/flutter/${ENGINE_VERSION}/android-arm-release/symbols.zip .\n\n# Replace libflutter.so\nunzip -o symbols.zip\nrm -rf symbols.zip\n\n# Upload symbols to Crashlytics\ncd ../../android\n./gradlew crashlyticsUploadSymbolsRelease\n\n### END MODIFICATIONS\n\n# Release your app like usual\ncd ../..\nfastlane submit_playalpha\n```\n\n### iOS\nOn iOS side you need to set your Fabric ID under your Info.plist like: \n(Only do this if using Fabric, not Firebase as you will not have an API Key)\n```\n\u003ckey\u003eFabric\u003c/key\u003e\n    \u003cdict\u003e\n        \u003ckey\u003eAPIKey\u003c/key\u003e\n        \u003cstring\u003eYOUR_ID_HERE\u003c/string\u003e\n        \u003ckey\u003eKits\u003c/key\u003e\n        \u003carray\u003e\n            \u003cdict\u003e\n                \u003ckey\u003eKitInfo\u003c/key\u003e\n                \u003cdict/\u003e\n                \u003ckey\u003eKitName\u003c/key\u003e\n                \u003cstring\u003eCrashlytics\u003c/string\u003e\n            \u003c/dict\u003e\n        \u003c/array\u003e\n    \u003c/dict\u003e\n```\n\nTurn off automatic collection with a new key to your Info.plist file (GDPR compliency if you want it):\n\nKey: firebase_crashlytics_collection_enabled\n\nValue: false\n\nDon't forget to add your `Run Script` step (with any version of Xcode) on the build phases tab. \nIf using `Xcode 10`, you also must add your app's built Info.plist location to the Build Phase's Input Files field:\n```\n$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)\n```\n\n![ios run script](https://github.com/kiwi-bop/flutter_crashlytics/raw/master/iosScript.jpg \"ios run script\") \n\n\nThat's it :)\n\n### Flutter \nAll you need to do under your code is to let the plugin handle the Flutter crashes.\n\nYour `main` method should look like:\n\n```\nvoid main() async {\n  bool isInDebugMode = false;\n\n  FlutterError.onError = (FlutterErrorDetails details) {\n    if (isInDebugMode) {\n      // In development mode simply print to console.\n      FlutterError.dumpErrorToConsole(details);\n    } else {\n      // In production mode report to the application zone to report to\n      // Crashlytics.\n      Zone.current.handleUncaughtError(details.exception, details.stack);\n    }\n  };\n\n  await FlutterCrashlytics().initialize();\n\n  runZoned\u003cFuture\u003cNull\u003e\u003e(() async {\n    runApp(MyApp());\n  }, onError: (error, stackTrace) async {\n    // Whenever an error occurs, call the `reportCrash` function. This will send\n    // Dart errors to our dev console or Crashlytics depending on the environment.\n    await FlutterCrashlytics().reportCrash(error, stackTrace, forceCrash: false);\n  });\n}\n```\n\n`forceCrash` allows you to have a real crash instead of the red screen, in that case the exception will be tagged as fatal.\n\n## API available\n- Add log to crash reporting with `log(String msg, {int priority, String tag})`\n- Add manual log to crash reporting with `logException(Error/Exception exception, Stacktrace stack)`\n- Add user info to crash reporting with `setUserInfo(String identifier, String email, String name)`\n- Add general info to crash reporting with `setInfo(String key, dyncamic value)`\n\n## Limitation \nThis plugin uses Crashlytics SDK to log manual dart crashes, all manually logged crashes are tagged as non fatal under Crashlytics, that's a limitation of the SDK.\n\nYou can bypass that limitation with the `forceCrash` parameter, instead of the red screen an actual crash will be appended, the crash will be tagged as fatal.\n\nOn iOS fatal crash has their dart stacktrace under the `Logs` tab of Crashlytics, that's a limitation of iOS that prevents developers to set a custom stacktrace to an exception. \n\n## Contribution\nWe love contributions! Don't hesitate to open issues and make pull request to help improve this plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiwi-bop%2Fflutter_crashlytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiwi-bop%2Fflutter_crashlytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiwi-bop%2Fflutter_crashlytics/lists"}