iOS and FirebaseCrashlytics - ios

I am trying to follow the instructions on Firebase Docs to upload missing required dSYMs. However I am stuck on running the uploader script.
In my build phases I have
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols -gsp${SRCROOT}/GoogleService-Info.plist -p ios ${SRCROOT}/appDsyms"
When I try building the iOS app with this, I get the error:
line 4: /path/to/Pods/FirebaseCrashlytics/upload-symbols -gsp/path/to/GoogleService-Info.plist -p ios /path/to/appDsyms: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
When I try running the script from the terminal I get the error:
No Google App ID or Google Services file provided
I have verified that I have a Google Services file and am able to run my project using other firebase services that rely on it. I used to be able to upload Dysm files directly into the Firebase Console, but that changes on March 1.
Should this command be run as an XCode script or a command from the terminal? And, more importantly, does anyone understand how to resolve this issue?

As of May 2020:
After Fabrics shut down, many developers faced such issues because Fabric was automatically creating the script to upload dSYM files from Xcode and we never pay attention to it.
Now as Fabric is replaced with FirebaseCrashlytics, in order to achieve this automatic mechanism, you can create a new run script and paste this script there:
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
This script will get the dSYM files and upload them to firebase servers so that you can see the crashes.
For multiple Schemes:
If your project has multiple schemes, you can simply create multiple such scripts by changing the path to the Google Plist file.
NOTE: You can also manually upload the dSYM files using upload-symbols tool [Check here], but it's always better to automate the process wherever we can.
EDIT: July 2020:
When you see missing dSYM files for the crash in the Crashlytics dashboard, instead of getting the email for it, you can upload the dSYM file for the build as soon as you submit it for Apple review or for testing via Test Flight.
Missing dSYM is shown because when bitCode is enabled, the App Store Connect process the binary post uploading it and generates a new dSYM file.
You can find the dSYM file from the Activity section in the App Store Connect.

2020 FirebaseCrashlytics solution
You have two solutions :
1) From the command line
Go to your project folder and run :
./Pods/FirebaseCrashlytics/upload-symbols -gsp GoogleService-Info.plist -p ios <path_to_your_dsyms_zip>
You can get your dsym in Xcode organizer > right click on the archive > show in Finder -> Show content -> go to dsymm folder and compress it
2) From Xcode Build Phases
As described here (Firebase doc), you can add a Run Script phase in Xcode with this content :
"${PODS_ROOT}/FirebaseCrashlytics/run"
You also have to add these two input files under the run script :
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
and
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

After hours of struggling with this problem finally solved it using this approach:
use this command in Terminal: /path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
Important thing is instead of /path/to/pods/directory you should enter the path to your pods folder in your application folder, and instead of /path/to you should enter the path to the GoogleService-Info.plist which is in your project folder too. And the last one is, instead of /path/to/dSYMs you should enter the path to your archive which has the format of .xcarchive.
For finding the .xcarchive path, you should first archive your application, then go to XCode -> Organizer and select your build, then right click on it and select "Show in finder" and then right click on your .xcarchive file and select "Show package contents". This is it, you can copy this path and paste it instead of /path/to/dSYMs and then hit enter to start uploading to Firebase Crashlytics.
Check out this link for more information:
Firebase Docs

While implementing FirebaseCrashlytics(Currently is in beta) for Crashlytics
Add new run script from Build Phases and add the following :
"${PODS_ROOT}/FirebaseCrashlytics/run"
In Input Files sections add
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
and
$(SRCROOT)/path to/GoogleService-Info.plist
If you still get dSYM missing error then try to run from terminal
/path/to/pods/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
For path to FirebaseCrashlytics and GoogleService-Info.plist drag and drop from the actual location
For dSYMs path will be ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
To get that hit the command with your project .xcodeproj and target xcodebuild -project YourProject.xcodeproj -target YourTarget -showBuildSettings
and replace your specific path
Please take note of the following while implementing Crashlytics
1. Run application in release mode
2. While testing disconnect device from mac
3. Set correct GoogleService-Info.plist
4. If you rename it, make sure you set the correct file name whenever required.

"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp
"${PROJECT_DIR}/additional_folder/GoogleService-Info.plist" -p ios
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
I replaced my GoogleService-Info.plist in additional folder and made directory changes in shell script. Probably you should do the same
For terminal command you better drag and drop necessary file in terminal then copy selected path
/path_to_pods/FirebaseCrashlytics/upload-symbols -gsp
/path_to_google_service/GoogleService-Info.plist -p iOS /path_to_dSYMs

Believe me, I spent one day but nothing worked,
Surprisingly few solutions are working for a few projects for my colleagues but I'm using Big Sur & Xcode 12.2 nothing worked for me.
Tried 1: Each step mentioned in firebase doc.
Tried 2: Tried to upload symbol from terminal by passing path_to_pod_firebasecrshlytics/uploadsybol -gsp path_to/GoogleService-Info.plist -p ios path_to/dSYMs
But, No luck,
Following trick works for me,
Step 1: make sure you are on the latest firebase crashlytics version for it, give a path to project & fire cmd pod update
I was using Firebase Crashlytics version 4.0.0-beta.1 but after pod update it is 8.2.0
Step 2: Go to build phase add a run script bellow compile bundle resources "${PODS_ROOT}/FirebaseCrashlytics/run"
Step 3: Add DYSM Script, "${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/your_path/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
Step 4: Build project;
Step 5: Run project & Stop or disconnect from storyboard
Step 6: Make crash 2-3 times & wait for 2-5 mins.
Cheers, All Set!

We can do:
PATH_TO_GOOGLE_PLISTS="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist"
To get a reference to the plist
Then use it:
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PATH_TO_GOOGLE_PLISTS}" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

Your Google Services path seems to be off. Here is an example of what my build phase looks like, which is able to successfully upload dSYM's. I suggest following these instructions one more time https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk?platform=ios&authuser=0.
find /Users/okodysh/Library/Developer/Xcode/DerivedData/myApp-ftqksfkpdvisbtaozpqzzjiizpfk/Build/Products/Debug-iphonesimulator -name "myApp.app.dSYM" | xargs -I {} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp /Users/okodysh/Desktop/iOSApps/myApp/myApp/GoogleService-Info.plist -p ios {}

Finally, I've figured it out and wrote a shell script to handle all this for me
Feel free to to use it: https://github.com/cs4alhaider/firebase-upload-symbols

Hmm nothing worked for me but changing this:
"${PODS_ROOT}/FirebaseCrashlytics/run"
to this:
"${PODS_ROOT}/FirebaseCrashlytics/run" -gsp "${PROJECT_DIR}/project_main_dir/google-services-files/iOS-GoogleService-Info.plist"
EDIT:
for those of you trying to complie to iOS's Catalyst:
you don't have to download two different Google JSON files. You should use only one (cause you have only 1 target). IF you want to upload a mac version of your app, just go to App Store Connect and create a new release for OSX (in the same page of your app)

In my case none were working until I added this:
"${PODS_ROOT}/FirebaseCrashlytics/run" -gsp "${PROJECT_DIR}/intermediate_folders/GoogleService-Info.plist"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/intermediate_folders/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
If I didn't add the path to the run command, the build phase would be running forever...

Check you FULL project folder path whether it contains space. I solve it by moving my project into another folder path that doesn't have space.

Related

Could not complete submission of dSYM, File no longer exists at (null)

I have migrated Fabric to Firebase/Crashlytics and I am getting this below build error for my run script in an iOS project,
Build Phase - Run Script
# Name of the resource we're selectively copying
GOOGLESERVICE_INFO_LOCATION=${PROJECT_DIR}/${TARGET_NAME}/App/Scripts/GoogleService-Info.plist
# Upload sysmbol
echo "Uploading dsym file"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp ${GOOGLESERVICE_INFO_LOCATION} -p ios ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
Build Error
[31merror: Could not complete submission of dSYM at /Users/me/Library/Developer/Xcode/DerivedData/Project-cmkidnrcwbunsqezgsrutqkmnivn/Build/Intermediates.noindex/ArchiveIntermediates/Project/BuildProductsPath/ReleaseOfficial-iphoneos/Project.app.dSYM: Error Domain=com.crashlytics.mac.error-domain.process-dsym Code=2 "File no longer exists at (null)" UserInfo={NSLocalizedFailureReason=File no longer exists at (null)}
Suggested in solution didn't work for me.
How to resolve it?
I recently got a new Mac and faced the same issue.
After trying lot of different things with no success, I found what was wrong. All I had to do, is to move my upload DSYM script at the bottom of the build phases script list.
We talk about this script:
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/YourPathToYourGoogleServiceFile/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
It has to be the last one executed
If this does not work, try this :
Comment your DSYM script, then archive your app.
Your archive should complete with success
Uncomment your DSYM script, and place it to the bottom list. (see correct order below)
Build a new archive.
Correct order :
run firebaseCrashlytics script.
run [CP] Embed pods frameworks
run DSYM Script
NB: In some cases, having a path containing some white spaces such as 'Supporting files' may lead to unexpected behaviour.

Xcode not generating all required dSYMs even though Build Settings have Debug Information Format = Dwarf with dSYM

Xcode is generating one dsym, which has the name of my app as the filename (e.g. MyApp.app.dSYM), but it's not generating the other dsyms with the UUIDs that Firebase is constantly telling me that I'm missing. (e.g. 92248A4B-6CA2-3B54-9787-C007E25C018F.dSYM)
I've followed the instructions, but something is still wrong. This was working when we were using Fabric, but since we updated to use Firebase directly, nothing is really working properly anymore.
I've followed the instructions on how to change the Build Settings to make sure the dSYMs get generated, but my Build Settings were already updated like that when I following the migration instructions from Fabric to Firebase. Here is a screenshot of my Build Settings:
Here is a screenshot of my Run Script Build Phase:
In the Archive Build Log, the only reference to generating dSYMs is for the one MyApp.app.dSYM that I get, but I need the others generated too.
GenerateDSYMFile
/Users/kenny/Library/Developer/Xcode/DerivedData/MyApp-dttbmiamkojuotbcyjgzerxhcqun/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
/Users/kenny/Library/Developer/Xcode/DerivedData/MyApp-dttbmiamkojuotbcyjgzerxhcqun/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp
(in target 'MyApp' from project 'MyApp')
cd /Users/kenny/inaday2/svn-MyApp/trunk/apps/iOS/MyApp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil
/Users/kenny/Library/Developer/Xcode/DerivedData/MyApp-dttbmiamkojuotbcyjgzerxhcqun/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp
-o /Users/kenny/Library/Developer/Xcode/DerivedData/MyApp-dttbmiamkojuotbcyjgzerxhcqun/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
Settings look okay, attaching the script I am using and process. Hope these info helps.
To have all the dsyms you need to first upload the build to Testflight and then from Tesflight, you need to download the final processed dSYM.zip.
A folder appDsyms.zip will be downloaded, once this is decompressed, you will see list of dSYM's
Post that use below script to upload the same to crashlytics.
So there are few changes done in Firebase Crashyltics the way dSYM mapped to the build we upload.
Initially, there was a manual option as well to upload but now that's abandoned and the only way by running the script from your terminal.
Pods/FirebaseCrashlytics/upload-symbols -gsp YOUR_PLIST_FULL_PATH -p ios ~/PATH_TO_DSYM_ZIP_OR_FOLDER
**Example[Below is my working script to upload dSYM to crashlytics]:**
Pods/FirebaseCrashlytics/upload-symbols -gsp MY_PRROJECT_NAME/Support/Firebase/Prod/GoogleService-Info.plist -p ios ~/Downloads/appDsyms

Change Fabric and Crashlytics pods with a Firebase/Crashlytics to Upload missing required dSYMs

I want to upload missing required dSYMs to firebase console but i can't because Firebase Crashlytics are update here, So i change Fabric to Firebase/Crashlytics in my code.
In appDelegate
import FirebaseCrashlytics
FirebaseApp.configure()
In Build Phases Run Script
And i run this command in terminal
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
And i got this after run command result
Still not fixed here
How to solve this problem?
You need to give proper path as below
${PODS_ROOT}/directory/FirebaseCrashlytics/upload-symbols -gsp ${PROJECT_DIR}/GoogleService-Info.plist -p ios ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
Below I posted what my code looks like for a successful call to the upload symbols script. I suggest going through this documentation again to figure out where you may have gone wrong.
find /Users/okodysh/Library/Developer/Xcode/DerivedData/myApp-ftqksfkpdvisbtaozpqzzjiizpfk/Build/Products/Debug-iphonesimulator -name "myApp.app.dSYM" | xargs -I {} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp /Users/okodysh/Desktop/iOSApps/myApp/myApp/GoogleService-Info.plist -p ios {}
After ours of struggling with this problem finally solved it using this approach:
use this command in Terminal: /path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
Important thing is instead of /path/to/pods/directory you should enter the path to your pods folder in your application folder, and instead of /path/to you should enter the path to the GoogleService-Info.plist which it's in your project folder too. And the last one is, instead of /path/to/dSYMs you should enter the path to your archive which is with the format of .xcarchive.
For finding the .xcarchive path, you shoud first archived your application then go to Organizer of Xcode and select your build then right click on it and select Show in finder and then right click on your .xcarchive file and select Show package contents. This is it, you can copy this path and paste it instead of /path/to/dSYMs and then hit enter to start uploading to Firebase crashlytics.

Could not get GOOGLE_APP_ID in Google Services file from build environment

For setting up firebase i am using two config 1.GoogleService-Info-test.plist, 2.GoogleService-Info-prdn.plist for UAT and Production. For installing crashlytics using firebase i have followed firebase documentation https://firebase.google.com/docs/crashlytics/get-started?authuser=1#ios. But when i try to run, it throws error in build phase while running script.
I tried without changing config file name and it worked.
Error msg at build phase while running fabric run script "Could not get GOOGLE_APP_ID in Google Services file from build environment".
Can anyone suggest better solution to achieve my requirement.
This is one way you can do it, by having your projects environments separated by targets, by doing so you can then add your different plist files and just check the target that they belong to, that way when you compile the target it will take it's corresponding plist file
Another way to do it, or to look up how to do it, it's called multiple environments with firebase, here are some helpful links
Use different GoogleService-Info.plist for different build schemes
https://medium.com/rocket-fuel/using-multiple-firebase-environments-in-ios-12b204cfa6c0
This worked for me:
When install Crashlytic with Firebase, for multiple scheme, you can have error Could not get GOOGLE_APP_ID in Google Services file from build environment. You can fix it by:
In Build Settings, add a user define for file name in User Defined:
In Build Phases, tap plus button, New Run Script Phase above your Crashlytic build phase, and type this code to the text field. Remember to rename %YOUR_CUSTOM_PATH_TO_FOLDER% to your path to Plist files:
GOOGLE_SERVICE_INFO_PLIST_FROM="${PROJECT_DIR}/%YOUR_CUSTOM_PATH_TO_FOLDER%/${FIREBASE_CONFIG_FILE}.plist"
BUILD_APP_DIR="${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}"
GOOGLE_SERVICE_INFO_PLIST_TO="${BUILD_APP_DIR}/GoogleService-Info.plist"
cp "${GOOGLE_SERVICE_INFO_PLIST_FROM}" "${GOOGLE_SERVICE_INFO_PLIST_TO}"
This worked for me:
Make sure you add the Xcode Crashlytics build phase after Copy Bundle Resources.
I had this in my "Build Phases" and it's works
"${PODS_ROOT}/FirebaseCrashlytics/run"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/MyApp/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
Our project only one target, but we need to use two Firebase config files GoogleService-Info-Prod.plist and GoogleService-Info-Dev.plist.
I had this in my "Build Phases" and it works.
if [ "${CONFIGURATION}" = "Release" ]; then
${PODS_ROOT}/FirebaseCrashlytics/run -gsp ${PROJECT_DIR}/RushCard/FirebaseConfig/GoogleService-Info-Prod.plist
else
${PODS_ROOT}/FirebaseCrashlytics/run -gsp ${PROJECT_DIR}/RushCard/FirebaseConfig/GoogleService-Info-Dev.plist
fi
In my case I created New Run Script Phrase above Compile Sources, that's why I always see
Could not get GOOGLE_APP_ID in Google Services file from build environment
When I moved Crashlytic's run script at the end of list bug was disappear. Please look the following screen shot:
And article about it is here
I use multiple configurations for several white-labelled apps. I added a User-Defined variable FIREBASE_SUFFIX and changed my script to the following:
${PODS_ROOT}/FirebaseCrashlytics/run -gsp ${PROJECT_DIR}/Firebase/GoogleService-Info-${FIREBASE_SUFFIX}.plist
NOTE: I use Carthage for firebase here: https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md. If you're this same setup, you should use something like this instead (replace the path to where you put your script files):
${PROJECT_DIR}/scripts/run -gsp ${PROJECT_DIR}/Firebase/GoogleService-Info-${FIREBASE_SUFFIX}.plist
Another way is to make sure one plist keeps the original name GoogleService-Info.plist
Different targets meant more work to update CI for me.
This is valid for Xcode 11 at least, not tested on any other versions
I was using new Firebase/Crashlytics which beta and getting error "No Google App ID or Google Services file provided" when I try to upload manually dSYMS
Here is command:
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols
-gsp/path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
Then I reliaze there should be space between "-gsp" and path to Google.plist after that It worked.
The solution for me was removing the call to upload-symbols script.
One of the Crashlytics guides mentions you should add this:
${PODS_ROOT}/FirebaseCrashlytics/run
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols <- Not needed
I misinterpreted this... the run script already calls upload-symbols so there's no need to add a second call.
Make sure in Xcode file explorer (i.e on the left side) "GoogleService-Info.plist" is showing. If not you have to drag and drop "GoogleService-Info.plist" in the Xcode panel.
In my case problem is I copy-pasted the file in the project location, due to this file reference is missing in the Project info.
Well all above answers purpose a possible solution for this issue, in my case GoogleService.plist file was missing from 'Copy Bundle Resources' by adding into it worked in my case..
To check the file goto
Project Directory >> Build Phases >> Copy Bundle Resources
add it add here if you find missing.
If these solutions provided above do not work, I solved mine by going to Build phases as shown on this image. Click on plus and add Google plist
I was able to fix this by locate where is my GoogleService-Info.plist, copy it to ios folder in Flutter and run with this script
"$PODS_ROOT/FirebaseCrashlytics/upload-symbols" --flutter-project "$PROJECT_DIR/firebase_app_id_file.json" -gsp "$PROJECT_DIR/GoogleService-Info.plist" -p ios "$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME"
Update:
I found a better solution:
Just upgrade all firebase package to lastest version
Remove Crashlytics build script
Run flutter clean, flutter pub get
pod install (in ios folder)
I had this issue because I didn't download GoogleService-Info.plist file from Firebase console.
If you have your project on Firebase but missing this file in Xcode, don't worry, you don't need to do the setup again from the beginning. Just go to:
Project Settings > General > Scroll down and in the "Your Apps" panel you will see the file and you can download it and import it in the Xcode project.
I had the same error, also due to the fact that I have multiple bundle identifier and therefore I have a build phase script called Firebase Script (that pinpoints to the correct GoogleService-Info.plist ) that was running after the Crashlytics script.
The solution is to run Firebase Script before the Crashlytics script.
In my case I had a different name in my file, his name was GoogleService-Enterprise-Info.plis when I change it to the normal name GoogleService-Info.plist, IT WORK FINE !!
I faced the same issue for #react-native-firebase/crashlytics
In case you are facing this issue, you probably have missed the 'ios setup' instruction mentioned in below link. Please follow the instruction to fix the issue.
https://rnfirebase.io/#generating-ios-credentials
Just download from Settings of your projects and place for your correct target which you are running.
This error would be shown if there is a space in your project name or in the path of your project.
Read more in this GitHub Issue
Additionally to other answers..
I faced that problem with exact same error message and in my case everything was ok with file GoogleService-Info.plist except that it was genereated with wrong Bundle ID for application (it was changed in XCode much later than initial Firebase setup happened), so I had to create new app in Firebase Console with correct Bundle ID (it's not able to edit) and download new GoogleService-Info.plist
If you are using one of the popular build scripts going around for handling multiple different environments, it is probably useful to know that you should use a different GoogleService-Info.plist destination based on the target platform:
// iOS
PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
// watchOS
PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.appex
// macOS
PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources
Ultimate guide:
Assure that in Runner folder you have file GoogleService-Info.plist and it is attached in your project
If you don't have this file go to Firebase Console, add you IOS app and download the GoogleService-Info.plist file, then add it to you project's Runner folder by XCode.
If there is no such file in XCode but it exists physically in the folder then right click on Runner folder (in Runner project) -> Add files to Runner -> Select that file
If you want to use multiple flavors add ENV_SUFFIX in Runner (target) -> Build Settings -> User-Defined (on the bottom)
Still in the target's Runner change tab to Build Phases -> Press Plus button -> New Run Script Phase -> Name it as Copy GoogleService-Info.plist and add this line
cp Runner/GoogleService-Info_${ENV_SUFFIX}.plist Runner/GoogleService-Info.plist
IMPORTANT! This script has to be before Initialize Crashlytics step or any other Firebase related script (you can drag it to the top)
Add other GoogleService-Info.plist files with suffix for the env. In my case those would be the _dev _prod and _tst files from the first screen shot
Enjoy multiflavor app
Try downgrading, it worked for me!
I used:
'Fabric', '1.9.0'
'Crashlytics', '3.12.0'

Why Crashlytics is asking for missing DSYM file every time?

I am using Crashlytics in my app everything working fine. even Crashlytics is also working good.
But the problem is that whenever I am creating a new build for our app
its again showing missing DSYM File upload new.
Is there any solution for this?
In fabric Document, I found this. but I did not understand this.
can anyone explain to me how to resolve this issue?
https://docs.fabric.io/apple/crashlytics/advanced-setup.html
We've recently encountered the same issue. Ended up with a bit customized version of an uploading script.
if [[ "${CONFIGURATION}" = "Release" ]] || [[ "${CONFIGURATION}" = "Adhoc" ]]; then
echo "Uploading dSYMs.."
find "${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs -I \{\} "${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${SRCROOT}/GoogleService-Info.plist" -p ios \{\}
else
echo "Skip dSYMs upload"
fi
Note quoted paths and skipped dSYM uploads in a Debug configuration. Though it probably won't matter most of the time, as dSYMS are switched off in the Debug configuration anyway.
Also the purpose of find here is to help upload dynamic frameworks' dSYM files. E.g. OS third-party libraries, project frameworks, etc. Otherwise, they won't be symbolicated. Though still presented in stack traces.
TL;DR
Everytime you recompile your project after adding a line of code, the dSYM changes because the address of your lines of code in the resulting binary is not the same.
You can look at Fabric docs about uploading dsym to automatically upload your dSYM by adding a build phase or use the Fabric pod instead of just Crashlytics which apparently adds a build phase automatically like #ekscrypto said.
If you still want to do this manually, open your xcarchive where you can find your dSYMs and upload them to crashlytics
More details
dSYM is short for debug SYMbols. This helps crashlytics resolve the crash logs it receives and helps display detailed information about the crashes/bugs that can occur.
When you archive your app, you're left with *.xcarchive "file" which really is a folder that you can browse. Inside this xcarchive, you should have a dSYM folder where your dSYMs are.
To view it, first open organizer window in XCode (Window > Organizer or cmd+shift+6), right click on the last archive and click "Show in Finder". On the Finder window that opens, right click the last xcarchive for your app and click on show contents (sorry the picture is in french)
This takes you inside your xcarchive where you can see the dSYMs for your app
Uploading this to crashlytics should solve your issue
in your Xcode project, under Build Phases add above run script:
"${PODS_ROOT}/Fabric/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
Simple Steps Follow
1 Go to archive and right click on the latest version in which you want to get crash report on firebase
2 see the dsyms folder
3 create the Zip file of dsyms folder
4 finally upload that zip file into the firebase console
This error means that some dSYM files are missing. The recommended approach is to constantly upload dSYM files to Crashlytics.
Now that Crashlytics is integrated in Firebase, the documentation has slightly changed: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk
Integrate Crashlytics : pod 'Firebase/Crashlytics'
Add a Run Script Phase :
find "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp ${SRCROOT}/GoogleService-Info.plist -p ios \{\}
In case you don't want to upload dSYM files each time you debug build your app : https://support.crashlytics.com/knowledgebase/articles/118559-can-i-make-the-dsym-uploading-only-on-release-buil
Make sure you integrate the new 'Fabric' framework and not only the Crashlytics framework. When you do so, you will end up with a new script in the Build Phase of your project.
This script will automatically locate your dSYM and upload it along with your build to the Fabric.io/Crashlytics system.
And they changed again:
find dSYM_directory -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp ${SRCROOT}/GoogleService-Info.plist -p ios \{\}
Check here:
https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk

Resources