Skip to content

Allow Xcode archive builds to be run in Debug and Profile build mode for testing #57557

Closed

Description

@mumenma

We connected the Flutter module in native iOS App, and entered the test phase after the completion of development.
In the test phase, we provide the archive debug App for the tester with continuous integration, and provide some unique functions.
However, we found an error "Flutter archive builds must be run in Release mode".
We want to know the reason .

Activity

  1. added
    platform-iosiOS applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    on May 19, 2020
  2. jmagman commented on May 19, 2020

    @jmagman
    Member

    Developers archiving for App Store submission hit SO many issues with accidentally submitting a Debug version, which crashes on launch:
    #12086
    #37850
    https://github.com/flutter/flutter/issues?q=label%3Aplatform-ios+label%3Atool+white+screen+is%3Aclosed

    Which of course means your legitimate QA use case isn't possible, even though you know what you're doing.

    I believe if you delete these lines from <Flutter-SDJ>/packages/flutter_tools/bin/xcode_backend.sh it may just work?

    # Archive builds (ACTION=install) should always run in release mode.
    if [[ "$ACTION" == "install" && "$build_mode" != "release" ]]; then
    EchoError "========================================================================"
    EchoError "ERROR: Flutter archive builds must be run in Release mode."
    EchoError ""
    EchoError "To correct, ensure FLUTTER_BUILD_MODE is set to release or run:"
    EchoError "flutter build ios --release"
    EchoError ""
    EchoError "then re-run Archive from Xcode."
    EchoError "========================================================================"
    exit -1
    fi

    Obviously editing Flutter out from under it isn't ideal. I can't think of a good way from within Xcode to confirm "Are you SURE you want to archive in Debug?!"

  3. changed the title [-] Flutter archive builds must be run in Release mode[/-] [+]Allow Xcode archive builds to be run in Debug and Profile build mode for testing[/+] on May 19, 2020
  4. mumenma commented on May 20, 2020

    @mumenma
    Author

    @jmagman
    Developers often use debug for develop. In my opinion, apps should not crash in debug with either Build or archive , we should find the crash reason, rather than close archive in debug. so we should Allow Xcode archive builds to be run in Debug and Profile build mode for testing.

  5. jmagman commented on May 20, 2020

    @jmagman
    Member

    @mumenma I agree there should be a way. I'm hoping we've fixed enough bugs related to the "accidental" debug archives that we can remove that check and -1 exit.

  6. github-actions commented on Aug 20, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Aug 20, 2021
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

    platform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions