Firebase crash: how to programmatically load a mapping file?

Crash in Firebase is a cool tool, but as far as I know, there is no way to programmatically load the Proguard mapping file through the API after the build.

Recently, there are no options to β€œautomate file downloads,” but there is no information on the learn page.

enter image description here

Does anyone know anything else?

+6
source share
2 answers

On December 15, the Crash Reporting plugin was released by google: it will generate a gradle task that loads the ProGuard mapping file into Firebase Crash.

Here are the steps to use it: https://firebase.google.com/docs/crash/android#uploading_proguard_mapping_files_with_gradle

+6
source

Unfortunately, this only looks like an iOS function: https://firebase.google.com/docs/crash/ios#upload_symbol_files .

Download character files

To view reports on human friendly accidents, you need to download symbol files after each build. This can be done automatically by adding a script run in Xcode.

Download the service account key to authenticate your downloads. On the Firebase console, select your project and click Create New Private Key. In Xcode, click on the application target, select "Generate Phases" and click + to add a phase. Select the Run script and add the following content, setting the appropriate values ​​for the service account path and GOOGLE_APP_ID: Replace it with GOOGLE_APP_ID from the GoogleService-Info.plist file GOOGLE_APP_ID = 1: mine: application: identifier

Replace / Path / To / ServiceAccount.json with the path to the just downloaded key "$ {PODS_ROOT}" / FirebaseCrash / upload -sym "/Path/To/ServiceAccount.json"

Note. If your service account key changes, reset your OAuth credentials by running this command: rm $ HOME / Library / Preferences / com.google.SymbolUpload *

0
source

Source: https://habr.com/ru/post/1011557/


All Articles