# How to go about sharing common Swift code between Android and iOS?

**URL:** <https://forums.swift.org/t/how-to-go-about-sharing-common-swift-code-between-android-and-ios/86456>\
**Category:** Android\
**Created:** [May 3, 2026, 8:44pm UTC](https://forums.swift.org/t/how-to-go-about-sharing-common-swift-code-between-android-and-ios/86456 "2026-05-03T20:44:50Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![marcprux](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/marcprux/32/12098_2.png) [@marcprux](https://forums.swift.org/u/marcprux)\
**Post date:** [May 4, 2026, 4:04pm UTC](https://forums.swift.org/t/how-to-go-about-sharing-common-swift-code-between-android-and-ios/86456/6 "2026-05-04T16:04:47Z")

</div>

> [@snej](#):
>
> Could you give a reference to what’s being done about this? Foundation bloat is a concern of mine too.

You can read about the ICU issue at [Android app size and lib\_FoundationICU.so](https://forums.swift.org/t/android-app-size-and-lib-foundationicu-so/78399). I'm afraid there hasn't been much progress on this front, and short of being able to externalize the ICU data files and "thin" them out with some bespoke tool, I don't know if there is any other realistic solution.

As for the Foundation transitive dependency, @madsodgaard has been doing great work (see [The adoption of `import FoundationEssentials` throughout the package ecosystem](https://forums.swift.org/t/the-adoption-of-import-foundationessentials-throughout-the-package-ecosystem/84112)). It's a bit of a whack-a-mole scenario, though, since any one transitive dependency that does `import Foundation` will trigger the size inflation.

---

_[View the full topic](https://forums.swift.org/t/how-to-go-about-sharing-common-swift-code-between-android-and-ios/86456)._
