# SPM: Merge multiple targets into a single module

**URL:** <https://forums.swift.org/t/spm-merge-multiple-targets-into-a-single-module/45012>\
**Category:** Using Swift\
**Tags:** packagemanager, module\
**Created:** [February 23, 2021, 7:52am UTC](https://forums.swift.org/t/spm-merge-multiple-targets-into-a-single-module/45012 "2021-02-23T07:52:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![obitow](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/obitow/32/9376_2.png) [@obitow](https://forums.swift.org/u/obitow)\
**Post date:** [February 23, 2021, 7:52am UTC](https://forums.swift.org/t/spm-merge-multiple-targets-into-a-single-module/45012/1 "2021-02-23T07:52:57Z")

</div>

Hello Swift Forum,

In my Xcode project I have a big framework with mixed Objective-C and Swift sources and I'm experimenting migrating it to Swift Package Manager. I had to break it up in several targets because of the mixed codebase. It works great, however now the clients of this framework have to import each individual target separately, when before they would just import the whole framework once.

Is there a way to merge all the targets into a single module? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![SDGGiesbrecht](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/sdggiesbrecht/32/4768_2.png) [@SDGGiesbrecht](https://forums.swift.org/u/SDGGiesbrecht)\
**Post date:** [February 23, 2021, 8:44am UTC](https://forums.swift.org/t/spm-merge-multiple-targets-into-a-single-module/45012/2 "2021-02-23T08:44:16Z")

</div>

It is not possible with the officially supported stable features, but the experimental `@_exported import` can be used in the top module so that clients get the others with it automatically.

---

<div class="post-metadata">

**Author:** ![obitow](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/obitow/32/9376_2.png) [@obitow](https://forums.swift.org/u/obitow)\
**Post date:** [February 23, 2021, 8:48am UTC](https://forums.swift.org/t/spm-merge-multiple-targets-into-a-single-module/45012/3 "2021-02-23T08:48:56Z")

</div>

Yeah, currently doing that, but apparently this doesn't work when importing from Objective-C.
