# Is Swift build only targeting MacOS?

**URL:** <https://forums.swift.org/t/is-swift-build-only-targeting-macos/89646>\
**Category:** Using Swift\
**Tags:** packagemanager, testing\
**Created:** [September 18, 2026, 3:31am UTC](https://forums.swift.org/t/is-swift-build-only-targeting-macos/89646 "2026-09-18T03:31:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![EndBird](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/endbird/32/40159_2.png) [@EndBird](https://forums.swift.org/u/EndBird)\
**Post date:** [September 18, 2026, 3:31am UTC](https://forums.swift.org/t/is-swift-build-only-targeting-macos/89646/1 "2026-09-18T03:31:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Diggory](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/diggory/32/4320_2.png) [@Diggory](https://forums.swift.org/u/Diggory)\
**Post date:** [September 18, 2026, 6:17am UTC](https://forums.swift.org/t/is-swift-build-only-targeting-macos/89646/2 "2026-09-18T06:17:43Z")

</div>

> [@EndBird](#):
>
> my package is declared for iOS platform only, in the manifest file.

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.)

---

<div class="post-metadata">

**Author:** ![EndBird](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/endbird/32/40159_2.png) [@EndBird](https://forums.swift.org/u/EndBird)\
**Post date:** [September 18, 2026, 11:37am UTC](https://forums.swift.org/t/is-swift-build-only-targeting-macos/89646/3 "2026-09-18T11:37:17Z")

</div>

Yeah im using platforms exactly how you said.

---

<div class="post-metadata">

**Author:** ![JacobHearst](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jacobhearst/32/31923_2.png) [@JacobHearst](https://forums.swift.org/u/JacobHearst)\
**Post date:** [September 18, 2026, 12:29pm UTC](https://forums.swift.org/t/is-swift-build-only-targeting-macos/89646/4 "2026-09-18T12:29:32Z")

</div>

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`.
