Lutfi Alatrash
Lutfi Alatrash

Reputation: 41

CI/CD Codemagic - (Flutter ios) Packages are not supported when using legacy build locations, but the current project has them enabled

I am trying to build my flutter app using codemagic, but every time I got this error

xcodebuild: error: Could not resolve package dependencies: Packages are not supported when using legacy build locations, but the current project has them enabled. Command: xcrun xcodebuild -list".

I know how to solve it from Xcode but in Codemagic CI/CD I cant use Xcode, is there any solution?

here is the log

== Building for iOS ==

xcode-project use-profiles

Configure code signing settings Searching for files matching /Users/builder/Library/MobileDevice/Provisioning Profiles/*.mobileprovision

List available code signing certificates in keychain /private/var/folders/pj/2d8_b7sn6f37c48z4jj09xk80000gn/T/build_r3ohi35a.keychain

Searching for files matching /Users/builder/clone/**/*.xcodeproj

Completed configuring code signing settings

Saved export options to /Users/builder/export_options.plist

flutter build ipa --release --export-options-plist /Users/builder/export_options.plist

Oops; flutter has exited unexpectedly: "ProcessException: Process exited abnormally: Command line invocation: /Applications/Xcode-12.4.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: xcrun xcodebuild -list".

Build failed :| Failed to build for iOS

Upvotes: 3

Views: 741

Answers (1)

Lutfi Alatrash
Lutfi Alatrash

Reputation: 41

Solution: open your xcode> file> workspace settings> advance, then check if you are using legacy and switch to default.

Upvotes: 1

Related Questions