Skip to content

Conversation

@cbracken
Copy link
Member

Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.

When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:

  1. The Embed Frameworks build phase for the Runner project
  2. The [CP] Embed Pods Frameworks build phase that pod install creates
    in the project.

Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.

As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.

See: #20685

@cbracken
Copy link
Member Author

Related #19241.

@cbracken cbracken force-pushed the use-legacy-xcode-build branch from dad4963 to 5c1e325 Compare September 17, 2018 19:32
@cbracken cbracken changed the title WIP: Use Xcode legacy build system for iOS builds Use Xcode legacy build system for iOS builds Sep 17, 2018
@cbracken cbracken force-pushed the use-legacy-xcode-build branch from 5c1e325 to e199db8 Compare September 17, 2018 19:39
@dnfield
Copy link
Contributor

dnfield commented Sep 17, 2018

LGTM

Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.

When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:

  1. The Embed Frameworks build phase for the Runner project
  2. The [CP] Embed Pods Frameworks build phase that pod install creates
     in the project.

Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.

As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.

See: flutter#20685
@cbracken cbracken force-pushed the use-legacy-xcode-build branch from e199db8 to 231784e Compare September 17, 2018 22:28
@cbracken cbracken merged commit 021f472 into flutter:master Sep 18, 2018
@cbracken cbracken deleted the use-legacy-xcode-build branch September 18, 2018 00:55
cbracken added a commit to cbracken/flutter that referenced this pull request Sep 18, 2018
This caused issues for projects without an Xcode workspace. Almost all
Flutter projects in the wild will have a workspace, but this patch needs
to add a check to catch any that lack one.

This reverts commit 021f472.
cbracken added a commit that referenced this pull request Sep 18, 2018
This caused issues for projects without an Xcode workspace. Almost all
Flutter projects in the wild will have a workspace, but this patch needs
to add a check to catch any that lack one.

This reverts commit 021f472.
cbracken added a commit to cbracken/flutter that referenced this pull request Sep 18, 2018
Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.

When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:

  1. The Embed Frameworks build phase for the Runner project
  2. The [CP] Embed Pods Frameworks build phase that pod install creates
     in the project.

Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.

As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.

See: flutter#20685
cbracken added a commit that referenced this pull request Sep 18, 2018
Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.

When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:

  1. The Embed Frameworks build phase for the Runner project
  2. The [CP] Embed Pods Frameworks build phase that pod install creates
     in the project.

Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.

As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.

See: #20685
hereisderek added a commit to hereisderek/flutter that referenced this pull request Sep 18, 2018
…dle-fix

* commit 'b01d3a2abc9cd44b3024b1219a9da5f8342939e0':
  Roll engine dcbc8a8..9e315e6 (3 commits) (flutter#21979)
  remove unnecessary ignore prefer_const_constructors (flutter#21934)
  Roll engine to dcbc8a8
  Roll engine to ba77529
  Revert "Use Xcode legacy build system for iOS builds (flutter#21901)" (flutter#21966)
  Use Xcode legacy build system for iOS builds (flutter#21901)
  Remove all "flaky" annotations from devicelab (flutter#21895)
  Roll engine 1b2a207..b0b19d6 (1 commits) (flutter#21948)
hereisderek added a commit to hereisderek/flutter that referenced this pull request Sep 18, 2018
…dle-fix

* commit '3c22d7b025642abd865160970d39f8c5ba7d3162':
  clarify how to display an image with a specific density (flutter#21152)
  Roll engine 9e315e6..2e8e96f (2 commits) (flutter#22005)
  Make helper and error text separate widgets, make error and counter live region (flutter#21752)
  Use Xcode legacy build system for iOS builds (flutter#21901) (flutter#21994)
  Run logcat through shell (flutter#21977)
  Add back screenshot extension that was temporarily disabled. (flutter#21828)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 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.

3 participants