You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 14, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: examples/plain/README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,3 +52,45 @@ A robust example of how to make best use of the Bugsnag React Native notifier.
52
52
```
53
53
react-native run-android --variant=release
54
54
```
55
+
56
+
## Deobfuscating stacktraces
57
+
58
+
This app provides working examples of how to deobfuscate stacktraces for JS, Android, and iOS. For further information, please consult [our React Native documentation](https://docs.bugsnag.com/platforms/react-native/showing-full-stacktraces/).
59
+
60
+
### JavaScript
61
+
62
+
You will need to upload source maps to Bugsnag in order to deobfuscate JavaScript stack traces. Example scripts for achieving this on Android/iOS in both debug and release builds can be found [here](scripts). The example scripts use [bugsnag-sourcemaps](https://github.com/bugsnag/bugsnag-sourcemaps), which is installed as a dev dependency of the project. The scripts can also be invoked in this example project using [npm run](https://docs.npmjs.com/cli/run-script.html):
63
+
64
+
```bash
65
+
npm run upload-sourcemaps:debug:android
66
+
npm run upload-sourcemaps:debug:ios
67
+
npm run upload-sourcemaps:release:android
68
+
npm run upload-sourcemaps:release:ios
69
+
```
70
+
71
+
Please note that if you use Code Push, you should specify `codeBundleId` in your JS configuration, and use that as the value of `app-version` instead. See [the docs](https://docs.bugsnag.com/platforms/react-native/showing-full-stacktraces) for further detail.
72
+
73
+
Note: recent versions of React Native have an [issue](https://github.com/facebook/react-native/issues/6946#issuecomment-405525464) which may result in the failure to apply source maps or incorrect line numbers being mapped.
74
+
75
+
### Android
76
+
77
+
The [Bugsnag Gradle Plugin](https://docs.bugsnag.com/build-integrations/gradle/) will automatically upload all the necessary mapping files when `react-native run-android --variant=release` is invoked.
78
+
79
+
ProGuard mapping files can also be uploaded manually in this example project by using [npm run](https://docs.npmjs.com/cli/run-script.html):
80
+
81
+
```bash
82
+
npm run upload-proguard:release:android
83
+
```
84
+
85
+
### iOS
86
+
87
+
If Bitcode is enabled in your project, you will first need to download your dSYMs from XCode or iTunes Connect, then upload them by using our fastlane plugin or bugsnag-dsym-upload. A working example of this can be found [here](ios/upload-react-native-dsyms.sh). The example script requires the installation of [bugsnag-dsym-upload](https://github.com/bugsnag/bugsnag-dsym-upload) to work, and can be invoked using [npm run](https://docs.npmjs.com/cli/run-script.html):
88
+
89
+
```bash
90
+
npm run upload-dsyms:release:ios
91
+
```
92
+
93
+
94
+
If you are not using Bitcode, you can use our Fastlane or Cocoapods integrations, or add a manual Build phase to upload the dSYMs.
95
+
96
+
Read the [iOS symbolication guide](https://docs.bugsnag.com/platforms/ios/symbolication-guide) for further details.
0 commit comments