Skip to content

Emit an actionable error message if FLUTTER_* not defined in Xcode run-script phases #12751

Open

Description

@cbracken

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

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-iosiOS applications specifically
    on Oct 27, 2017
  2. cbracken commented on Oct 27, 2017

    @cbracken
    MemberAuthor

    Expected settings:
    screen shot 2017-10-26 at 18 01 45

  3. cbracken commented on Oct 27, 2017

    @cbracken
    MemberAuthor

    We could include include a link back to the expected settings this issue if there's not a clear way to word this.

  4. cbracken commented on Oct 27, 2017

    @cbracken
    MemberAuthor

    Related issues #12748, #12749, #12750

  5. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    and removed
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Apr 23, 2018
  6. added
    t: xcode"xcodebuild" on iOS and general Xcode project management
    and removed
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Jan 5, 2019
  7. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    and removed
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Jan 7, 2019
  8. jmagman commented on Aug 16, 2019

    @jmagman
    Member

    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

  9. jmagman commented on Aug 16, 2019

    @jmagman
    Member

    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.

  10. iapicca commented on Nov 1, 2019

    @iapicca

    Hi @cbracken is this issue still meant to be open?

  11. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 1, 2019
  12. jmagman commented on Nov 1, 2019

    @jmagman
    Member

    I still think it would be useful.

  13. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 1, 2019
  14. added
    P3Issues that are less important to the Flutter project
    on Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectplatform-iosiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions