Skip to content

Always build iOS Archive builds in release mode - #12773

Merged
cbracken merged 1 commit into
flutter:masterfrom
cbracken:archive-in-release-mode
Oct 28, 2017
Merged

cbracken merged 1 commit into
flutter:masterfrom
cbracken:archive-in-release-mode

Conversation

@cbracken

Copy link
Copy Markdown
Member

Archive builds for upload to iTunes Connect should always be built in
release mode, not doing so results in crash on startup.

Bug: #12086

@xster xster left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to prevent local engine overrides and then archive?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because Xcode builds always pick up the previous build mode.

Currently, it's necessary to run flutter build ios --release in order to produce a Generated.xcconfig with the correct build mode and framework directory for an archive build.

@cbracken
cbracken force-pushed the archive-in-release-mode branch from bc564c4 to d605451 Compare October 28, 2017 00:46
@cbracken

Copy link
Copy Markdown
Member Author

There's a bit more work here to support this properly. Most importantly, even with an override of FLUTTER_BUILD_MODE and FLUTTER_FRAMEWORK_DIR, we need to ensure we've run a pod install that picks up the release-mode framework.

For now, I've updated to just emit an error with instructions and exit with a build failure. Long-term, I think the right thing to do is make the Xcode build more hermetic and reduce the dependency on a previous command-line run.

Archive builds for upload to iTunes Connect should always be built in
release mode, not doing so results in crash on startup.

Bug: flutter#12086
@cbracken
cbracken force-pushed the archive-in-release-mode branch from d605451 to 3c9ed01 Compare October 28, 2017 01:00
@xster

xster commented Oct 28, 2017

Copy link
Copy Markdown
Member

Still LG

@cbracken
cbracken merged commit acdbe45 into flutter:master Oct 28, 2017
@cbracken
cbracken deleted the archive-in-release-mode branch October 28, 2017 01:23
DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
Archive builds for upload to iTunes Connect should always be built in
release mode, not doing so results in crash on startup.

Bug: flutter#12086
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants