Skip to content

Commit

Permalink
Merge pull request #107 from surfstudio/firebase_dsym_upload
Browse files Browse the repository at this point in the history
feat: Add uploading dsym to firebase for iOS
  • Loading branch information
ekinsdrow authored Mar 18, 2024
2 parents 2f54493 + 7d56c23 commit a17379c
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 93 deletions.
21 changes: 15 additions & 6 deletions docs/firebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ To use Firebase in your project, you need to do the following:
4. Create project at [Firebase Console](https://console.firebase.google.com/).
5. Execute command to create a new project for certain flavor (e.g. dev flavor) in Firebase or select existing and specify supported platforms:
```sh
flutterfire configure -p name_or_id_of_your_project -o lib/firebase_options_dev.dart --platforms android,ios -i your.ios.bundleId.dev -a your.android.package.name.dev
flutterfire configure \
-p name_or_id_of_your_project \
-o lib/config/firebase/firebase_options_dev.dart \
--platforms android,ios \
-i your.ios.bundleId.dev \
-a your.android.package.name.dev
```

params description:
Expand All @@ -28,8 +33,9 @@ To use Firebase in your project, you need to do the following:

As a result, you will get `firebase_options_dev.dart` file with Firebase options for dev flavor and created apps in Firebase project.

6. Move generated `firebase_app_id_file.json` to `ios/Firebase/{flavor_name}` folder - e.g. `ios/Firebase/dev/firebase_app_id_file.json`.
7. Pass generated `DefaultFirebaseOptions` to `Environment` in entry point of your app:
6. Move generated `ios/firebase_app_id_file.json` to `ios/Firebase/{flavor_name}` folder - e.g. `ios/Firebase/dev/firebase_app_id_file.json`.
7. Move generated `ios/Runner/GoogleService-Info.plist` to `ios/Firebase/{flavor_name}` folder - e.g. `ios/Firebase/dev/GoogleService-Info.plist`.
8. Pass generated `DefaultFirebaseOptions` to `Environment` in entry point of your app:
```dart
/// Main entry point of app.
void main() {
Expand All @@ -50,10 +56,13 @@ To use Firebase in your project, you need to do the following:

## Readable crash reports in the Crashlytics dashboard

The `flutterfire configure` command will attempt to automatically configure your project to send readable crash reports to Crashlytics.
To set up uploading dsym to firebase on iOS, you need to follow steps 6 and 7 from the instructions above for each flavor.

Unfortunately, there are cases that can result in the project not being fully configured.
[This guide](https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=flutter) outlines what the automation does and provides first steps to debug your project setup.
To download dsym to Android you need to call the command
```sh
firebase crashlytics:symbols:upload --app=FIREBASE_APP_ID PATH/TO/symbols
```

More details are described in [this guide](https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=flutter) outlines what the automation does and provides first steps to debug your project setup.


Empty file added ios/Firebase/dev/.gitkeep
Empty file.
Empty file added ios/Firebase/prod/.gitkeep
Empty file.
Loading

0 comments on commit a17379c

Please sign in to comment.