Is Swift build only targeting MacOS?

When I try running ‘swift test’ in my terminal, there was an error saying a dependency doesn’t have a product for MacOS, or something like that. I was confused because my package is declared for iOS platform only, in the manifest file.

Why does Swift test try to build for MacOS?

Can you post that bit of your manifest? I’m not sure that you can do that using the platforms parameter. If you list some platforms and don’t list others, it just means ‘use the default supported platform versions’ for the unlisted platforms. (The name is somewhat confusing.)

Yeah im using platforms exactly how you said.

So far as I know swift commands (confusingly) don't know how to build for the iOS platform. I've always had to use xcodebuild.

2 Likes