Repository navigation
Packages are not supported when using legacy build locations, but the current project has them enabled #76868
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consoleplatform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
I had the issue at #57083 The solution from This comment works but when I have a clean clone the problem starts again
Note: I have the changes to the file Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata committed to the codebase
Steps to Reproduce
- Create a new flutter app
- Add a swift package to the ios project
- if
xcodebuild -listfails use this solution - if you followed step 3 commit the changes of the file
Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedatato your codebase. - push everything and then have a clean clone and try
xcodebuild -list
Expected results: The solution worked before and it should work no problem.
Actual results: You still need to change from legacy to xcode-default
flutter run --verbose output
flutter doctor -v output
[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H524 darwin-x64,
locale en-US)
• Flutter version 1.22.6 at /Users/ahussein/development/flutter
• Framework revision 9b2d32b605 (5 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/ahussein/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.0
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.53.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0
[✓] Connected device (1 available)
• Ammar’s iPhone (mobile) • 07e805c86df752a6bf2ccdb27e6094290a8c9cda • ios •
iOS 14.4
! Doctor found issues in 1 category.
More docs
-
screenshot of ios/Runner.xcodeproj (not Runner.xcworkspace) > File > Project Settings > Per-User Project Settings: > Advanced. (after a clean clone)

-
ios/Runner.xcodeproj/project.xcworkspace/xcuserdata/USER.xcuserdatad/WorkspaceSettings.xcsetting
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
<string>UseTargetSettings</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>IssueFilterStyle</key>
<string>ShowActiveSchemeOnly</string>
<key>LiveSourceIssuesEnabled</key>
<true/>
<key>ShowSharedSchemesAutomaticallyEnabled</key>
<true/>
</dict>
</plist>
ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consoleplatform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Activity
jmagman commentedon Feb 26, 2021
Thanks for all the details!
ios/Runner.xcodeproj/project.xcworkspace/xcuserdata/USER.xcuserdatad/WorkspaceSettings.xcsettingios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedataammaratef45 commentedon Feb 26, 2021
@jmagman I've attached them in
More docssection in the issuejmagman commentedon Feb 26, 2021
Hm yeah that's the problem. Can you attach your project's
.metadatafile so I can see what version of Flutter you were on when you generated the project?ammaratef45 commentedon Feb 26, 2021
@jmagman Where can I find that?
jmagman commentedon Feb 26, 2021
It should be a file named
.metadatain the root of your Flutter project. If it's missing, do you happen to remember what version of Flutter you were on when you created your project?ammaratef45 commentedon Feb 26, 2021
@jmagman
The file is messing but most likely it was
Flutter 1.22.5 • channel stableThe project was created by a co-worker and they didn't upgrade their flutter since creating it
TahaTesser commentedon Mar 1, 2021
Hi @ammaratef45
Thanks for filing the issue
Changed
Advanced from Legacy to Xcode DefaultandWorkspaceSettings.xcsettingsis as followsThe app builds and runs after the changes
It shouldn't be legacy but code default, in your project it shows legacy, #44811 (comment)
flutter doctor -v
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.2.2 20D80 darwin-x64, locale en-GB) • Flutter version 1.22.6 at /Users/tahatesser/Code/flutter_stable • Framework revision 9b2d32b605 (5 weeks ago), 2021-01-22 14:36:39 -0800 • Engine revision 2f0af37152 • Dart version 2.10.5 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Volumes/Extreme/SDK • Platform android-30, build-tools 30.0.3 • ANDROID_HOME = /Volumes/Extreme/SDK • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.4) • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1 [!] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) [✓] VS Code (version 1.53.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.19.0 [✓] Connected device (1 available) • Taha’s iPad (mobile) • 00008020-000255113EE8402E • ios • iOS 14.4 ! Doctor found issues in 1 category.A similar issue was filed #74586
ammaratef45 commentedon Mar 1, 2021
@TahaTesser As I mentioned, changing to Xcode default solves it but with a clean clone it is reverted back to legacy and I have to change it again.
That breaks my CI/CD builds as they always depend on a clean clone.
20 remaining items
jmagman commentedon Jun 2, 2021
This is available in 2.3.0-12.0.pre (currently dev channel)
alex-zige commentedon Jun 2, 2021
thanks @jmagman 👍
TimurDyushaliev commentedon Aug 26, 2021
jmagman commentedon Feb 8, 2024
Closing, legacy build locations are no longer supported by Flutter or Xcode.
github-actions commentedon Feb 22, 2024
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 -vand a minimal reproduction of the issue.