When you build/test a Swift package in a directory where both Package.swift and *.xcodeproj exist at the top level, xcodebuild fails to recognize a scheme "MyPackage-Package" in the Swift package (.swiftpm).
It is most probably because the presence of .xcodeproj forces xcodebuild to use that project by default, even if you are not specifying -project or -workspace argument when building the Swift package.
There should be a way to specify user intentions via. xcodebuild arguments so that the build system knows exactly what to build/test.
When you build/test a Swift package in a directory where both Package.swift and *.xcodeproj exist at the top level, xcodebuild fails to recognize a scheme "MyPackage-Package" in the Swift package (.swiftpm).
It is most probably because the presence of .xcodeproj forces xcodebuild to use that project by default, even if you are not specifying
-projector-workspaceargument when building the Swift package.There should be a way to specify user intentions via. xcodebuild arguments so that the build system knows exactly what to build/test.