# Linux only dependency leads to resolving error for iOS

**URL:** <https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036>\
**Category:** Package Manager\
**Tags:** linux, packagemanager, xcodebuild, ios, traits\
**Created:** [January 9, 2026, 9:49am UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036 "2026-01-09T09:49:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bioche](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bioche/32/8486_2.png) [@bioche](https://forums.swift.org/u/bioche)\
**Post date:** [January 9, 2026, 9:49am UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/1 "2026-01-09T09:49:05Z")

</div>

Hello Swift community !

We are experiencing an issue with SPM on a specific case. The issue has been reported here : [Missing OpenCombine in Package.resolved file · pointfreeco/combine-schedulers · Discussion #112 · GitHub](https://github.com/pointfreeco/combine-schedulers/discussions/112#discussioncomment-15447465) .

The library on this repo (combine-schedulers) has in its dependencies OpenCombine but it is only used in the target for Linux platform. Its package.swift can be found here : [combine-schedulers/Package.swift at main · pointfreeco/combine-schedulers · GitHub](https://github.com/pointfreeco/combine-schedulers/blob/main/Package.swift)

Our iOS project uses combine-schedulers and this doesn’t cause issue on XCode 26 as OpenCombine is just ignored and doesn’t appear in package.resolved

However the problem occurs on our CI where the flag _ **disableAutomaticPackageResolution** _ is set. Apparently SPM gets confused, somehow thinks OpenCombine is necessary and complains about its absence in the package.resolved. The error :

```swift
Could not resolve package dependencies: an out-of-date resolved file was detected at 
/Volumes/workspace/repository/App.xcworkspace/xcshareddata/swiftpm/Package.resolved, 
which is not allowed when automatic dependency resolution is disabled;
 please make sure to update the file to reflect the changes in dependencies. 
Running resolver because the following dependencies were added: 'opencombine' (https://github.com/OpenCombine/OpenCombine.git)

```

As a workaround we can add OpenCombine directly in our iOS project dependencies but this is a shame as we don’t use it.

Is this a known limitation of SPM ?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![andrekandore](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/andrekandore/32/2292_2.png) [@andrekandore](https://forums.swift.org/u/andrekandore)\
**Post date:** [January 10, 2026, 12:35am UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/2 "2026-01-10T00:35:37Z")

</div>

> [@bioche](#):
>
> As a workaround we can add OpenCombine directly in our iOS project dependencies but this is a shame as we don’t use it.

if its an xcode project, perhaps you can use the excluded sourced feature `EXCLUDED_SOURCE_FILE_NAMES` with a pattern that matches opencombine.

link: [EXCLUDED\_SOURCE\_FILE\_NAMES](https://developer.apple.com/documentation/xcode/build-settings-reference#Excluded-Source-File-Names)

※ i’m assuming your linux builds aren’t using xcodebuild but even if they are, you could work around that with target specific configs i think

※ there is also `EXCLUDED_EXPLICIT_TARGET_DEPENDENCIES` but i’ve never used that before…

---

<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 10, 2026, 8:39am UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/3 "2026-01-10T08:39:41Z")

</div>

Had similar problem with Swift 6.2.0 and traits, after installing Swift 6.2.3 and running `swift package resolve`, it added the dependency to the resolved file for me. After the resolved file is fixed, the project should build fine with other Swift versions.

---

<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 10, 2026, 9:58am UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/4 "2026-01-10T09:58:25Z")

</div>

Having the trait is totally useless in this project. `swift build --disable-default-traits` fails on Linux, the trait doesn't affect anything else on other platforms. So my advice would be to just remove the trait from the project.

---

<div class="post-metadata">

**Author:** ![bioche](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bioche/32/8486_2.png) [@bioche](https://forums.swift.org/u/bioche)\
**Post date:** [January 10, 2026, 10:58pm UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/5 "2026-01-10T22:58:38Z")

</div>

> [@bioche](#):
>
> Missing OpenCombine in Package.resolved file · pointfreeco/combine-schedulers · Discussion #112 · GitHub

We’ll give this a try on XCode 26.2 as we’ve only tested on 16.2 for now, thanks !

---

<div class="post-metadata">

**Author:** ![bioche](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bioche/32/8486_2.png) [@bioche](https://forums.swift.org/u/bioche)\
**Post date:** [January 10, 2026, 11:01pm UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/6 "2026-01-10T23:01:21Z")

</div>

I’m not the one maintaining the combine-schedulers lib and I’m not familiar with how traits work. But this remark may be interesting to @stephencelis or @mbrandonw ^^

---

<div class="post-metadata">

**Author:** ![stephencelis](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/stephencelis/32/2675_2.png) [@stephencelis](https://forums.swift.org/u/stephencelis)\
**Post date:** [January 11, 2026, 7:03am UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/7 "2026-01-11T07:03:07Z")

</div>

Sadly it does not appear to be "totally useless." In practice the trait gates the OpenCombine dependency from being downloaded and shown in Xcode's sidebar. Eliminating the trait and simply depending on the `.when` platforms list does not appear to be enough.

We may be exploiting an Xcode/SPM bug/quirk, but the iOS community is generally averse to too many dependencies, and so we're trying to minimize the footprint on Apple platforms.

---

<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 11, 2026, 8:20am UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/8 "2026-01-11T08:20:02Z")

</div>

Are you sure it's not downloaded instead of just missing from the sidebar because it's also missing from the resolved file?

---

<div class="post-metadata">

**Author:** ![stephencelis](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/stephencelis/32/2675_2.png) [@stephencelis](https://forums.swift.org/u/stephencelis)\
**Post date:** [January 11, 2026, 8:52pm UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/9 "2026-01-11T20:52:55Z")

</div>

It does unfortunately appear to download into derived data, so the main effect is cosmetic, but one that folks have complained about.

---

<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 11, 2026, 9:06pm UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036/10 "2026-01-11T21:06:21Z")

</div>

There is always the option to have a separate package for just the prebuilt xcframework, like how Lottie does it: [GitHub - airbnb/lottie-spm: Swift Package Manager support for Lottie, an iOS library to natively render After Effects vector animations](https://github.com/airbnb/lottie-spm/)
