Search code examples
xcodecontinuous-integrationcrashlyticstwitter-fabricxcode-bots

Xcode CI - Bot script for uploading to Fabric gives error "Failed to Detect Build Environment"


Trying to setup an Xcode CI Bot to build and upload my app to Fabric for beta distribution.

The bot builds and archives the app just fine, but fails on the Fabric upload script. Any suggestions?

Log:

IPA Path: /Users/XcodeServer/Library/Caches/XCSBuilder/Integration-c7216425c354c42adb04283fc31b6348/ExportedProduct/MyApp.ipa
2016-11-17 12:40:23.967 uploadDSYM[55991:2048496] Fabric.framework/run 1.6.2 (205)
2016-11-17 12:40:23.972 uploadDSYM[55991:2048496] Launched uploader in validation mode
error: Fabric: Failed to Detect Build Environment

Script:

IPA_PATH="${XCS_PRODUCT}"
echo "IPA Path: ${IPA_PATH}"
"${XCS_PRIMARY_REPO_DIR}"/MyApp/Pods/Fabric/run <API> <KEY> -ipaPath "${IPA_PATH}" -emails [email protected]

Solution

  • Solved it. I was using the wrong script (pulled from the app's build phase when setting up Fabric). You have to use the crashlytics script:

    "${XCS_PRIMARY_REPO_DIR}"/MyApp/Pods/Crashlytics/submit <API> <KEY> -ipaPath "${IPA_PATH}" -emails [email protected]