Using XCode10.5.1, iOS 14.6, Swift5.4.2,
Using the Swift Package Manger (SPM) for getting Firebase dependency in to my project - I try to get going Google Crashlytics on my iOS device.
I saw in several posts (ex. this one) that in order for Crashlytics to work via the SPM, you need to add a Build run script in Xcode as follows:
${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run
Now since I do have two different configurations defines (DEV and PROD), I somehow need to make this run script know about this.
My script looks as follows:
if ["${CONFIGURATION}" == "Release"] || ["${CONFIGURATION}" == "Debug"]; then
${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run
elif ["${CONFIGURATION}" == "ReleaseDev"] || ["${CONFIGURATION}" == "DebugDev"]; then
${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run -gsp ${PROJECT_DIR}/iOS/SupportFiles/GoogleService-InfoDev.plist
fi
But Crashlytics still does not work !
Question NR1: How does the run script look like for Crashlytics to work with SPM ?
Question NR2: In particular, how can I improve my run script for making a clear distinction between DEV and PROD environment. (so far I need to do the workaround with CONFIGURATION
).