New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode 11 Swift Packages incompatible with "flutter build" #44811
Comments
I've tried experimenting with |
Does it work from Xcode? |
It works from Xcode.
The New Build System. I've tried both with and without |
I can reproduce. When I build Runner.xcodeproj in Xcode I get the same error.
That seems like an Xcode bug? The project is not using the legacy build system, unless I'm totally misunderstanding what "legacy build locations" means. At the least, xcodeproj.dart should be passing in the -workspace flag. Thanks for the helpful debugging, @LinusU. |
Actually that won't work, the point of that |
Hi @jmagman I have attached the logs: Flutter crash report; please file at https://github.com/flutter/flutter/issues. commandflutter build ios exceptionProcessException: ProcessException: Process exited abnormally:
flutter doctor
|
I think don't downgrading Flutter would help. The workaround is to run
Okay I was misunderstanding, I think "legacy build locations" isn't related to the legacy build system, it's related to where the From the command line, Flutter points almost everything that would be written into DerviedData (not the module cache I think) instead into |
When I opened Runner.xcodeproj (not Runner.xcworkspace) > File > Project Settings > Per-User Project Settings: > Advanced I saw this: My
Then I switched it in the GUI to Xcode Default, which changed that key from UseTargetSettings to UseAppPreferences. Then I had to re-launch Xcode, and I could add Swift packages to the project and I was able to I'm not sure why it's getting set to UseTargetSettings by default. That file is .gitignored and Flutter doesn't generate it... |
I think this is because the compatibilityVersion in the generated Xcode project is set to Xcode 3.2. A new non-Flutter Xcode project uses Xcode 9.3. Let's update the templates to that. |
#49654 updated the compatibility version for new flutter apps, but doesn't migrate existing ones. The manual migration is to go into the File inspector and swap Project Format from "Xcode 3.2-compatible" to "Xcode 9.3-compatible". or swap File > Project Settings > Per-User Project Settings: > Advanced from Legacy to Xcode Default |
Command
LogsProcessException: Process exited abnormally: xcodebuild: error: Could not resolve package dependencies:
Flutter Application MetadataType: app Pluginsplugin_scaffold-3.1.0 |
@chandrabezzo See #57083 |
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 |
We are trying to use a Swift package using the newly integrated Swift Package Manager in Xcode 11 in our iOS specific platform code. While it works as long as we build the app via Xcode, we cannot build or run the app using the flutter tool.
Steps to Reproduce
Target Platform: iOS
Target OS version/browser: iOS 13
Devices: iPhone 8, iPhone 11 Pro
command
flutter build ios
exception
flutter doctor
The text was updated successfully, but these errors were encountered: