Most of you would be familiar with Firebase integration in your apps, Firebase helps developers by producing human-readable crash reports. But sometimes, this fails due to dSYM files uploading failure.
Debug Symbol files (dSYM) files are required by Firebase Crashlytics to give the app developers a human-readable crash report on its console. These dSYM files are uploaded and processed automatically by the firebase. But in some cases, due to the settings in the Xcode Project, this isn’t possible and uploading fails.
First Way:
- Changing Settings in XCode:-
The first and foremost thing to check in this condition is the XCode itself. Sometimes, dSYM files aren’t even produced by the XCode.
The upload failure message can be seen on Firebase Console (“Missing dSYM”) as an alert.
To check XCode:
- We have to open and select the project file in XCode navigation.
- Select our main project build target.
- Select the Build Settings tab, and then select ‘ALL’ option.
- Then set Debug Information Format to DWARF with dSYM File.
- Finally, rebuild the app.
If even after following the above steps, the problem persists, we have to locate and upload dSYM files to solve this problem.
Second Way:
- From App Store Connect:-
Another additional way is by downloading dSYM generated by Apple :
Apple can generate dSYM files for builds where bitcode is enabled. These builds should also be either released to the App Store or uploaded to TestFlight for testing.
To Download dSYM from App Store :
- Login to your App Store Connect account.
- Select the build from the Activity panel.
- From Build Details directly download dSYM files.
Third Way:
- From Local Machine:-
One more way is to find the dSYM files on your local PC :
The following command provided in Firebase docs can be used to find all the missing dSYMs on your local machine. This command can be executed directly on your Terminal.
mdfind -name .dSYM | while read -r line; do dwarfdump -u "$line"; done
If this command gives results, upload these dSYMS on crashlytics.
How to upload dSYMs?
Crashlytics provides back up upload-symbols script which can be used to manually upload the dSYM files.
To use the script, developers can include the following script provided by Crashlytics team in Build Process:
find dSYM_directory -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p platform \{\}
Or the developers can directly run a script from their Terminals, the script is as follows :
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
Hope these steps will help you, Thanks for reading.