You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emit an actionable error message if FLUTTER_* not defined in Xcode run-script phases #12751
If Generated.xcconfig has not been #included in the Xcode project configuration, FLUTTER_ROOT is undefined and Xcode will be unable to locate xcode_backend.sh. In the flutter create project template, we should include something similar to the following boilerplate above the execution of the xcode_backend.sh script:
if [ ! -f "$FLUTTER_ROOT"/packages/flutter_tools/bin/xcode_backend.sh" ]; then
echo "xcode_backend.sh not found"
echo "FLUTTER_ROOT is '$FLUTTER_ROOT'"
echo "Verify that your Xcode project is configured to use the Debug or Release profile"
exit 1
fi
Can we add a set -u to the top so the script phase fails when it's not substituted? I did this recently with the module build phase script: 975156e
Actually that doesn't add much except a slightly more helpful error. The script phase already fails if the script isn't found because it's looking for /packages when FLUTTER_ROOT is missing.
Activity
cbracken commentedon Oct 27, 2017
Expected settings:

cbracken commentedon Oct 27, 2017
We could include include a link back to the expected settings this issue if there's not a clear way to word this.
cbracken commentedon Oct 27, 2017
Related issues #12748, #12749, #12750
jmagman commentedon Aug 16, 2019
Can we add a
set -uto the top so the script phase fails when it's not substituted? I did this recently with the module build phase script:975156e
jmagman commentedon Aug 16, 2019
Actually that doesn't add much except a slightly more helpful error. The script phase already fails if the script isn't found because it's looking for
/packageswhenFLUTTER_ROOTis missing.iapicca commentedon Nov 1, 2019
Hi @cbracken is this issue still meant to be open?
jmagman commentedon Nov 1, 2019
I still think it would be useful.