In my Flutter project, I need to add dependencies on the native iOS part of my project.
For that, I use Swift Package Manager.
But each time I try to run my app, after adding a dependency, I get the following build error:
ProcessException: Process exited abnormally:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list
xcodebuild: error: Could not resolve package dependencies:
Packages are not supported when using legacy build locations, but the current project has them enabled.
Command: /usr/bin/xcodebuild -list
More details here .
Since I'm new to iOS development, how can I add dependencies in Xcode so my Flutter app works?
Thanks.
I think I might have the fix for you.
Please close your workspace in XCode, and go back and open the.xcodeproj file INSTEAD of the.xcworkspace file.
(/yourApp/ios/Runner.xcodeproj most likely)
When the project is open, in XCode menu bar click File -> Project Settings -> Advanced.
Change the option from LEGACY to XCODE DEFAULT.
Now open the.xcworkspace again and it should work!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.