-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docs/delete-from-device
- Loading branch information
Showing
9 changed files
with
173 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/content/docs/guides/crash-reporting/Integrations/crashlytics.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: Crashlytics Integration | ||
description: Integrate Shorebird into your Crashlytics crash reporting | ||
sidebar: | ||
label: Crashlytics | ||
order: 2 | ||
--- | ||
|
||
If you're using Crashlytics for crash reporting, it will work out-of-the-box | ||
with Shorebird releases and patches. However, if you have multiple patches, it | ||
can be unclear which patch caused the crash. This document shows how you can use | ||
Crashlytics to differentiate between patches. | ||
|
||
## Add the `shorebird_code_push` package to your project. | ||
|
||
[shorebird_code_push](https://pub.dev/packages/shorebird_code_push) is available | ||
on pub.dev and lets you programmatically determine your app's current patch | ||
number. To add it to your project, follow the instructions on the package's | ||
pub.dev page. | ||
|
||
## Configure Crashlytics | ||
|
||
If you haven't already, follow the Crashlytics [getting started with | ||
Flutter](https://firebase.google.com/docs/crashlytics/get-started?platform=flutter) guide. | ||
|
||
Update the Firebase init code to include the patch number as a custom key. This will look | ||
something like: | ||
|
||
```dart | ||
Future<void> main() async { | ||
WidgetsFlutterBinding.ensureInitialized(); | ||
await Firebase.initializeApp( | ||
options: DefaultFirebaseOptions.currentPlatform, | ||
); | ||
final patchNumber = await ShorebirdCodePush().currentPatchNumber(); | ||
// Add the patch number as a tag. You can use whatever name you would like | ||
// as the key. `$patchNumber` will be "null" if there is no patch. You may | ||
// wish to handle this case differently. | ||
FirebaseCrashlytics.instance.setCustomKey( | ||
'shorebird_patch_number', | ||
'$patchNumber', | ||
); | ||
runApp(const MyApp()); | ||
} | ||
``` |
49 changes: 49 additions & 0 deletions
49
src/content/docs/guides/crash-reporting/Integrations/sentry.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: Sentry Integration | ||
description: Integrate Shorebird into your Sentry crash reporting | ||
sidebar: | ||
label: Sentry | ||
order: 1 | ||
--- | ||
|
||
If you're using Sentry for crash reporting, it will work out-of-the-box with | ||
Shorebird releases and patches. However, if you have multiple patches, it can be | ||
unclear which patch caused the crash. This document shows how you can use Sentry | ||
tags to differentiate between patches. | ||
|
||
## Add the `shorebird_code_push` package to your project. | ||
|
||
[shorebird_code_push](https://pub.dev/packages/shorebird_code_push) is available | ||
on pub.dev and lets you programmatically determine your app's current patch | ||
number. To add it to your project, follow the instructions on the package's | ||
pub.dev page. | ||
|
||
## Configure Sentry | ||
|
||
If you haven't already, follow the Sentry [getting started with | ||
Flutter](https://docs.sentry.io/platforms/flutter/) guide. | ||
|
||
Update the Sentry init code to include the patch number as a tag. This will look | ||
something like: | ||
|
||
```dart | ||
Future<void> main() async { | ||
// Get the current patch number. This will be null if no patch is installed. | ||
final patchNumber = await ShorebirdCodePush().currentPatchNumber(); | ||
await SentryFlutter.init( | ||
(options) { | ||
options.dsn = 'YOUR_DSN'; | ||
}, | ||
appRunner: () { | ||
// Add the patch number as a tag. You can use whatever name you would like | ||
// as the key. `$patchNumber` will be "null" if there is no patch. You may | ||
// wish to handle this case differently. | ||
Sentry.configureScope((scope) { | ||
scope.setTag('shorebird_patch_number', '$patchNumber'); | ||
}); | ||
return runApp(const MyApp()); | ||
}, | ||
); | ||
} | ||
``` |
4 changes: 2 additions & 2 deletions
4
src/content/docs/guides/crash-reporting.mdx → ...des/crash-reporting/uploading-symbols.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters