I'm trying to implement new FirebaseCrashlytics in my iOS app and having some issues and some things are not clear at all.
As per Upgrade doc in step 3, I have to add following run script:
${PODS_ROOT}/FirebaseCrashlytics/run
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols
so, in my case it is:
"${PODS_ROOT}/FirebaseCrashlytics/run"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols"
But compile was failing because:
Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Validation succeeded. Exiting because upload-symbols was run in validation mode
[31merror: No Google App ID or Google Services file provided[0m
Command PhaseScriptExecution failed with a nonzero exit code
If I delete upload-symbols
line it is working fine, I'm getting crashes in Dashboard, but as far as I understand this upload-symbols
has to upload dSYM
files of app users, so I have no worry about this. Means I still need it...
So I tried to replace them:
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols"
"${PODS_ROOT}/FirebaseCrashlytics/run"
And it started to compile.
I did a force crash and got it in Dashboard, but also I got:
Does it mean that it is not working and it is must be after run
, so I continued and finished with:
"${PODS_ROOT}/FirebaseCrashlytics/run"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}"
Now I was able to compile, but still getting optional dSYM
in Dashboard.
Now I'm completely lost, if anyone can clarify it would be great.
PS: I'm able to use upload-symbols
from terminal, but it is kind of manual job.
Few more questions as a discussion:
- Why in Upgrade docs it is
run
andupload
script, but in Get started onlyrun
? - In Upgrade docs it is exact path for
${PODS_ROOT}/FirebaseCrashlytics/run
but not exact for/path/to/pods/directory/FirebaseCrashlytics/upload-symbols
they are same folder, why not use same? - in Get started docs there are input files and one of them is
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
why they are using(
, not{
? - This path
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
is path toInfo.plist
file, not toGoogleService-Info.plist
why they gave it then?)