# Are Swift+Objc static libraries supported by Xcode? Are Swift static libraries even supported?

**URL:** <https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461>\
**Category:** Using Swift\
**Tags:** objective-c, linking\
**Created:** [January 29, 2026, 9:20pm UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461 "2026-01-29T21:20:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [January 29, 2026, 9:20pm UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461/1 "2026-01-29T21:20:51Z")

</div>

We have an SDK that we vend as both a dynamic framework and static library. We recently added our first Swift file to it, and we are unable to access the Swift code from Objc when building it as a static library:

```swift
'MySDK/MySDK-Swift.h' file not found

```

The same code works when building as a dynamic framework. Is there something else I need to do to enable this to work? Or is it just not supported at all?

---

<div class="post-metadata">

**Author:** ![ksluder](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@ksluder](https://forums.swift.org/u/ksluder)\
**Post date:** [January 29, 2026, 9:25pm UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461/2 "2026-01-29T21:25:08Z")

</div>

Have you considered an .xcframework instead of a static library? I believe these are supported by SwiftPM as well.

---

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [January 29, 2026, 9:26pm UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461/3 "2026-01-29T21:26:20Z")

</div>

That is how we vend the dynamic framework. Do xcframeworks also support static linking? My understanding is they do not

We have a niche use case where static linking is favorable for some of our customers

---

<div class="post-metadata">

**Author:** ![ksluder](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@ksluder](https://forums.swift.org/u/ksluder)\
**Post date:** [January 29, 2026, 9:27pm UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461/4 "2026-01-29T21:27:54Z")

</div>

Yes: [Creating a multiplatform binary framework bundle | Apple Developer Documentation](https://developer.apple.com/documentation/xcode/creating-a-multi-platform-binary-framework-bundle)

> To include a static library file (`.a` file), replace `-framework` with `-library` in the command above.

---

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [January 29, 2026, 9:39pm UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461/5 "2026-01-29T21:39:04Z")

</div>

TIL! We will experiment with this 👀 (In the meantime, I am curious about my question on a technical level if anyone knows the answer)

---

<div class="post-metadata">

**Author:** ![ksluder](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@ksluder](https://forums.swift.org/u/ksluder)\
**Post date:** [January 29, 2026, 9:41pm UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461/6 "2026-01-29T21:41:31Z")

</div>

My guess is that this is a modules thing. Maybe you could find a suitable place to put the `.modulemap`, but you’re swimming upstream.

---

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [January 30, 2026, 3:27am UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461/7 "2026-01-30T03:27:28Z")

</div>

_“I love module maps so much!”,_ he said with heavy sarcasm

---

<div class="post-metadata">

**Author:** ![Cyberbeni](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cyberbeni/32/46241_2.png) [@Cyberbeni](https://forums.swift.org/u/Cyberbeni)\
**Post date:** [January 30, 2026, 9:02am UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461/8 "2026-01-30T09:02:45Z")

</div>

You could combine the 2 types: [Configuring your project to use mergeable libraries | Apple Developer Documentation](https://developer.apple.com/documentation/xcode/configuring-your-project-to-use-mergeable-libraries)
