Upload dSYM to Firebase using terminal-iOS
Today we will upload the dSYM to Firebase using the terminal by following the steps.
1. Go to your project setting in the Xcode and select the DWARF with dSYM File in the Debug Information Format of Build Options.
2. Go to Window->Organizer. Select the archive for which you want to upload the dSYM to Firebase.
3. Right-click on the selected archive and select the show in the finder
4. You will see the archive file in the new window, again select the file and right-click on it. Now select the Show Package Contents.
5. Now you will see the dSYMs folder. Copy it and paste it where you want.
6. Now we need to create a command so that we can run it on our terminal to upload the dSYM.
This command consists 3 things
1. Path of FirebaseCrashlytics Pod folder of your project
2. Path of GoogleService-Info file of your project
3. Path of dSYMs folder(as we get it before 6 points)
Easy to get these paths open your terminal and drag & drop each path in your terminal and copy it in your notes so that we can combine all these three paths to make a single command.
Once you get these three paths just replace them in the following command and run it on your terminal.
PATH of the FirebaseCrashlytics Pod folder of your project/upload-symbols -gsp PATH of GoogleService-Info file of your project -p ios PATH of dSYMs folder
Once you replace these three paths in the above-mentioned command then just copy it and paste it into your terminal. You will see that dSYM starts uploading. Once all the dSYM is uploaded then you will get a success message on your terminal. After that just open your Firebase console and refresh it. You will see the crashes listed there.
The best thing is that whenever you shared your archive with any person either for testing or demo do this part always. So, whenever any person faces any crash then it's reported to Firebase and you will get an idea of which file you need to handle so that this crash will not come in next time.