diff --git a/docs/assets/crashreporterplugin.png b/docs/assets/crashreporterplugin.png new file mode 100644 index 000000000..410959638 Binary files /dev/null and b/docs/assets/crashreporterplugin.png differ diff --git a/docs/assets/crashreporterpluginnotification.png b/docs/assets/crashreporterpluginnotification.png new file mode 100644 index 000000000..ef0a272b6 Binary files /dev/null and b/docs/assets/crashreporterpluginnotification.png differ diff --git a/docs/crash-reporter-plugin.md b/docs/crash-reporter-plugin.md new file mode 100644 index 000000000..62d255ba8 --- /dev/null +++ b/docs/crash-reporter-plugin.md @@ -0,0 +1,50 @@ +--- +id: crash-reporter-plugin +title: Crash Reporter Plugin +--- + +The Crash Reporter Plugin shows a notification in Flipper whenever an app crashes. You can click on the notification to see crash information like stacktrace and other metadata. For Android, you can also use the "Open in Logs" action to find the relevant point in the logs view, so that it is easy to investigate what had happend before the crash. + +Since this is an alpha release, it doesn't fire notification on all kind of crashes. It fires notifications on uncaught exceptions for both Android and iOS applications, whereas it fires crash notification for signal errors just for iOS and currently not for Android. We are still working on it, but do try out this plugin. Feedback and issues are welcome! + +The plugin looks like the following + +![UI](/docs/assets/crashreporterplugin.png) + +![Notification](/docs/assets/crashreporterpluginnotification.png) + +## Setup + +### iOS + +Add crash reporter plugin to the client. + +#### Objective-C + +```objectivec +#import + +[client addPlugin:[FlipperKitCrashReporterPlugin sharedInstance]]; + +``` + +#### Swift + +```swift +import FlipperKit + +client?.add(FlipperKitCrashReporterPlugin.sharedInstance()); + +``` + +### Android + +Add crash reporter plugin to the client. + +```java +import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; + +client.addPlugin(CrashReporterPlugin.getInstance()); + +``` + diff --git a/docs/getting-started.md b/docs/getting-started.md index 8fc6959b8..ba111b82d 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -100,10 +100,10 @@ target 'MyApp' do platform :ios, '9.0' pod 'FlipperKit', '~>' + flipperkit_version - # Layout and network plugins are not yet supported for swift projects pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', '~>' + flipperkit_version pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version + pod 'FlipperKit/FlipperKitCrashReporterPlugin', '~>' + flipperkit_version post_install do |installer| installer.pods_project.targets.each do |target| diff --git a/website/sidebars.json b/website/sidebars.json index 7a2de42c2..f3ad5e99b 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -12,7 +12,8 @@ "network-plugin", "sandbox-plugin", "shared-preferences-plugin", - "leak-canary-plugin" + "leak-canary-plugin", + "crash-reporter-plugin" ], "Plugins: Desktop part": [ "js-setup",