Skip to content

Configuration Script for Crashlytics #12481

@raulsilvamx

Description

@raulsilvamx

Description

I'm sharing the Crashlytics configuration for Xcode that has worked for me. Any comments or suggestions are welcome.

# Type a script or drag a script file from your workspace to insert its path.

# Check if the build configuration is DEBUG
if [ "${CONFIGURATION}" == "Debug" ]; then
    # If DEBUG, append "-DEBUG" to the target name
    TARGET_NAME="Debug"
else
    # If not DEBUG, use the original target name
    TARGET_NAME="Release"
fi

# Set the source path of GoogleService-Info.plist
SOURCE_PLIST_PATH="${PROJECT_DIR}/**MAIN_DIRECTORY**/Resources/Google/GoogleService-Info-${TARGET_NAME}.plist"

# Set the destination path in the target build directory
DESTINATION_PLIST_PATH="${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleService-Info.plist"

# Set the destination path of DWARF file
DESTINATION_DWARF_DSYM_PATH="${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

# Copy the GoogleService-Info.plist to the target build directory with the target name
cp "${SOURCE_PLIST_PATH}" "${DESTINATION_PLIST_PATH}"

echo "Copied ${SOURCE_PLIST_PATH} to ${DESTINATION_PLIST_PATH}"
echo "Executing:"
echo "${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols -gsp ${DESTINATION_PLIST_PATH} -p ios ${DESTINATION_DWARF_DSYM_PATH}"
${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols -gsp "${DESTINATION_PLIST_PATH}" -p ios "${DESTINATION_DWARF_DSYM_PATH}"

API Proposal

No response

Firebase Product(s)

Crashlytics

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions