# \#spm

**URL:** https://forums.swift.org/tag/spm/21.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [\`NDEBUG\` vs SPM dependencies](https://forums.swift.org/t/ndebug-vs-spm-dependencies/90458)

<div class="topic-metadata">

**Author:** [@tera](https://forums.swift.org/u/tera)\
**Replies:** 1\
**Last updated:** [November 5, 2026, 7:54am UTC](https://forums.swift.org/t/ndebug-vs-spm-dependencies/90458 "2026-11-05T07:54:29Z")

</div>

DEBUG is being passed to SPM dependencies when the app configuration is named "debug", "development" or contains those names as substrings - good to know. RELEASE is not being passed, although typically RELEASE is the o…

---

## [Perchly — private Swift package registry for teams](https://forums.swift.org/t/perchly-private-swift-package-registry-for-teams/88961)

<div class="topic-metadata">

**Author:** [@Another1dd](https://forums.swift.org/u/Another1dd)\
**Replies:** 0\
**Last updated:** [August 13, 2026, 1:00pm UTC](https://forums.swift.org/t/perchly-private-swift-package-registry-for-teams/88961 "2026-08-13T13:00:26Z")

</div>

Hey everyone, I'm Timophei, an indie developer, and I built Perchly, a private Swift package registry for teams: perchly.dev The problem I kept running into: if you have a few related Swift packages living in one monore…

---

## [Cadence – rate limiting, debouncing & request coalescing (zero-dependency, Swift 6)](https://forums.swift.org/t/cadence-rate-limiting-debouncing-request-coalescing-zero-dependency-swift-6/88790)

<div class="topic-metadata">

**Author:** [@peteroettl](https://forums.swift.org/u/peteroettl)\
**Replies:** 0\
**Last updated:** [August 5, 2026, 9:09am UTC](https://forums.swift.org/t/cadence-rate-limiting-debouncing-request-coalescing-zero-dependency-swift-6/88790 "2026-08-05T09:09:11Z")

</div>

I've open-sourced Cadence, a small Swift 6 concurrency library for pacing outbound requests. It came out of a weather app that hammers a strictly rate-limited public API from an app, a widget, and a watch complication …

---

## [DylibForge: relinking static archives into dynamic libraries without source code](https://forums.swift.org/t/dylibforge-relinking-static-archives-into-dynamic-libraries-without-source-code/88200)

<div class="topic-metadata">

**Author:** [@loupehope](https://forums.swift.org/u/loupehope)\
**Replies:** 4\
**Last updated:** [August 1, 2026, 2:50pm UTC](https://forums.swift.org/t/dylibforge-relinking-static-archives-into-dynamic-libraries-without-source-code/88200 "2026-08-01T14:50:13Z")

</div>

Static linkage is a common choice for Swift package products in iOS projects. For example, Tuist links package products statically by default. It is often appropriate for release builds but can introduce friction during…

---

## [\[Pitch\] Disjoint Package Dependency Version Ranges](https://forums.swift.org/t/pitch-disjoint-package-dependency-version-ranges/88483)

<div class="topic-metadata">

**Author:** [@CrownedPhoenix](https://forums.swift.org/u/CrownedPhoenix)\
**Replies:** 2\
**Last updated:** [July 24, 2026, 8:42pm UTC](https://forums.swift.org/t/pitch-disjoint-package-dependency-version-ranges/88483 "2026-07-24T20:42:49Z")

</div>

\[Pitch\] Disjoint Package Dependency Version Ranges Authors: Jairon Terrero Status: Pitch Implementation: Add union-of-versions package dependency requirement by CrownedPhoenix · Pull Request #10339 · swiftlang/swift-pac…

---

## [Swift Build Plugin permission prompts](https://forums.swift.org/t/swift-build-plugin-permission-prompts/88260)

<div class="topic-metadata">

**Author:** [@jbelkins](https://forums.swift.org/u/jbelkins)\
**Replies:** 0\
**Last updated:** [July 13, 2026, 10:46pm UTC](https://forums.swift.org/t/swift-build-plugin-permission-prompts/88260 "2026-07-13T22:46:40Z")

</div>

I've recently shipped a feature that uses a Swift Package Manager build-tool plugin. Overall, the experience is great, it works essentially trouble-free. With one exception, that is. My build-tool plugin works within …

---

## [Swift-openapi-mock — Record/replay middleware that matches on operationID, not URLs](https://forums.swift.org/t/swift-openapi-mock-record-replay-middleware-that-matches-on-operationid-not-urls/85825)

<div class="topic-metadata">

**Author:** [@RhonnyG](https://forums.swift.org/u/RhonnyG)\
**Replies:** 0\
**Last updated:** [April 5, 2026, 2:49pm UTC](https://forums.swift.org/t/swift-openapi-mock-record-replay-middleware-that-matches-on-operationid-not-urls/85825 "2026-04-05T14:49:17Z")

</div>

Hi everyone :waving\_hand: I've just released swift-openapi-mock, an open-source ClientMiddleware for apps built with swift-openapi-generator that lets you record real API responses and replay them offline — with zero ne…

---

## [Synthesized Bundle.module is not usable in nonisolated code in packages with MainActor default isolation](https://forums.swift.org/t/synthesized-bundle-module-is-not-usable-in-nonisolated-code-in-packages-with-mainactor-default-isolation/84416)

<div class="topic-metadata">

**Author:** [@marco.masser](https://forums.swift.org/u/marco.masser)\
**Replies:** 10\
**Last updated:** [March 31, 2026, 1:14pm UTC](https://forums.swift.org/t/synthesized-bundle-module-is-not-usable-in-nonisolated-code-in-packages-with-mainactor-default-isolation/84416 "2026-03-31T13:14:47Z")

</div>

I have a Swift package where the Package.swift file defines .defaultIsolation(MainActor.self) for my library target because it mostly contains view-level code. The Bundle.module that is automatically synthesized by SPM i…

---

## [Access target build settings from build tool plugin](https://forums.swift.org/t/access-target-build-settings-from-build-tool-plugin/83727)

<div class="topic-metadata">

**Author:** [@soumyamahunt](https://forums.swift.org/u/soumyamahunt)\
**Replies:** 3\
**Last updated:** [December 18, 2025, 10:20am UTC](https://forums.swift.org/t/access-target-build-settings-from-build-tool-plugin/83727 "2025-12-18T10:20:40Z")

</div>

I am looking for reading the build settings of the target in BuildToolPlugin. However I see no relevant APIs offered by Target or SourceModuleTarget that can be used to read these values. I tried using ProcessInfo.proces…

---

## [Why does my local package have access to all of my workspace's dependencies?](https://forums.swift.org/t/why-does-my-local-package-have-access-to-all-of-my-workspaces-dependencies/83651)

<div class="topic-metadata">

**Author:** [@BitByAVampire](https://forums.swift.org/u/BitByAVampire)\
**Replies:** 0\
**Last updated:** [December 10, 2025, 6:32am UTC](https://forums.swift.org/t/why-does-my-local-package-have-access-to-all-of-my-workspaces-dependencies/83651 "2025-12-10T06:32:48Z")

</div>

I have a local package that I created and add to my workspace, and it seems to be able to have access to all the dependencies added to my workspace, for example, ModuleA. Even though I did not declare Module A as a depen…

---

## [canImport and SwiftUI Previews](https://forums.swift.org/t/canimport-and-swiftui-previews/68760)

<div class="topic-metadata">

**Author:** [@mapedd](https://forums.swift.org/u/mapedd)\
**Replies:** 5\
**Last updated:** [December 2, 2025, 1:27pm UTC](https://forums.swift.org/t/canimport-and-swiftui-previews/68760 "2025-12-02T13:27:56Z")

</div>

Hello all! I'm scratching my head with the problem: Is it possible to import a module that contains a sample preview data, let's call it Mocks, using #if canImport(Mocks) but only in DEBUG? Modules are setup using pa…

---

## [Swift Package Manager and supported platforms / avoiding \`@available(macOS 10.15.0, \*)\`](https://forums.swift.org/t/swift-package-manager-and-supported-platforms-avoiding-available-macos-10-15-0/59882)

<div class="topic-metadata">

**Author:** [@sspringer](https://forums.swift.org/u/sspringer)\
**Replies:** 17\
**Last updated:** [November 25, 2025, 10:20pm UTC](https://forums.swift.org/t/swift-package-manager-and-supported-platforms-avoiding-available-macos-10-15-0/59882 "2025-11-25T22:20:41Z")

</div>

The description of how to use the platforms in a SPM manifest (Package.swift) seems to be ambiguous: Citation: By default, the Swift Package Manager assigns a predefined minimum deployment version for each supported p…

---

## [Archive is unusually slow after using Swift Package as a modular tool](https://forums.swift.org/t/archive-is-unusually-slow-after-using-swift-package-as-a-modular-tool/83382)

<div class="topic-metadata">

**Author:** [@jihongboo](https://forums.swift.org/u/jihongboo)\
**Replies:** 0\
**Last updated:** [November 23, 2025, 4:08pm UTC](https://forums.swift.org/t/archive-is-unusually-slow-after-using-swift-package-as-a-modular-tool/83382 "2025-11-23T16:08:09Z")

</div>

I recently modularized my app by creating several infrastructure and feature libraries. Initially, I managed these libraries using Framework Targets, but I recently tried converting them to Swift Packages. Everything se…

---

## [How am I supposed to consume a package with "unsafe flags" in my app?](https://forums.swift.org/t/how-am-i-supposed-to-consume-a-package-with-unsafe-flags-in-my-app/81511)

<div class="topic-metadata">

**Author:** [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Replies:** 5\
**Last updated:** [August 6, 2025, 11:54pm UTC](https://forums.swift.org/t/how-am-i-supposed-to-consume-a-package-with-unsafe-flags-in-my-app/81511 "2025-08-06T23:54:44Z")

</div>

I'm trying to use OCMock in a project. The package product 'OCMock' cannot be used as a dependency of this target because it uses unsafe build flags. Great. I saw somewhere that specifying a commit hash instead of a ve…

---

## [Xcode can't see added package dependency](https://forums.swift.org/t/xcode-cant-see-added-package-dependency/47524)

<div class="topic-metadata">

**Author:** [@JetForMe](https://forums.swift.org/u/JetForMe)\
**Replies:** 7\
**Last updated:** [August 6, 2025, 12:01am UTC](https://forums.swift.org/t/xcode-cant-see-added-package-dependency/47524 "2025-08-06T00:01:35Z")

</div>

I've finally gotten my SPM-based wrapper library working by itself. So now I added it as a local dependency following Apple’s instructions. It shows up in Xcode's project navigator, in the Link Binary With Libraries buil…

---

## [Issues with SwiftPM and Cross-compiling from Mac to arm64, armv7, armv6 and amd64](https://forums.swift.org/t/issues-with-swiftpm-and-cross-compiling-from-mac-to-arm64-armv7-armv6-and-amd64/26458)

<div class="topic-metadata">

**Author:** [@rvsrvs](https://forums.swift.org/u/rvsrvs)\
**Replies:** 2\
**Last updated:** [July 28, 2025, 2:50pm UTC](https://forums.swift.org/t/issues-with-swiftpm-and-cross-compiling-from-mac-to-arm64-armv7-armv6-and-amd64/26458 "2025-07-28T14:50:25Z")

</div>

Hi, Over on the swift-arm slack channel we've recently been discussing a problem we've been having when cross-compiling. x-compiling seems to work fine on the platforms mentioned in the subject line, but we have a probl…

---

## [Avoiding Plugin Execution in a Linked Swift Package During Top-Level Package Builds](https://forums.swift.org/t/avoiding-plugin-execution-in-a-linked-swift-package-during-top-level-package-builds/80828)

<div class="topic-metadata">

**Author:** [@nareshreddywf](https://forums.swift.org/u/nareshreddywf)\
**Replies:** 0\
**Last updated:** [July 1, 2025, 12:51pm UTC](https://forums.swift.org/t/avoiding-plugin-execution-in-a-linked-swift-package-during-top-level-package-builds/80828 "2025-07-01T12:51:51Z")

</div>

I am working on an iOS project using Xcode 16.0 that leverages multiple Swift packages. Among these, I have a Shared Package that contains reusable code and is linked to several top-level feature packages (e.g., VideoPla…

---

## [Obj-C Package with Swift Dependency Not Accessible in Swift](https://forums.swift.org/t/obj-c-package-with-swift-dependency-not-accessible-in-swift/63137)

<div class="topic-metadata">

**Author:** [@jaxdesmarais](https://forums.swift.org/u/jaxdesmarais)\
**Replies:** 2\
**Last updated:** [May 29, 2025, 10:05pm UTC](https://forums.swift.org/t/obj-c-package-with-swift-dependency-not-accessible-in-swift/63137 "2025-05-29T22:05:46Z")

</div>

I've searched through the Forums and found similar questions but thus far none of the answers seem to work for the case I am running into. I have a Swift Package defined like so as an example: @objcMembers public class…

---

## [What exactly does \`-c release\` do?](https://forums.swift.org/t/what-exactly-does-c-release-do/78546)

<div class="topic-metadata">

**Author:** [@c01](https://forums.swift.org/u/c01)\
**Replies:** 3\
**Last updated:** [March 15, 2025, 2:45pm UTC](https://forums.swift.org/t/what-exactly-does-c-release-do/78546 "2025-03-15T14:45:37Z")

</div>

Hi! 1: What exactly does -c release do when passed to swiftui build in a package? From looking at SPMs source briefly, I'd say things like -Xlinker -dead\_strip, -O, and -O2 (C flag, so probably with -Xcc?), but is that …

---

## [Can I test a package without building every single target?](https://forums.swift.org/t/can-i-test-a-package-without-building-every-single-target/57921)

<div class="topic-metadata">

**Author:** [@crichez](https://forums.swift.org/u/crichez)\
**Replies:** 2\
**Last updated:** [March 9, 2025, 12:42pm UTC](https://forums.swift.org/t/can-i-test-a-package-without-building-every-single-target/57921 "2025-03-09T12:42:33Z")

</div>

Objective I am looking to run tests defined in a test target by exclusively building the test target and its declared dependencies. This means skipping targets not explicitly defined as dependencies in that test target's…

---

## [Extract Swift Package on-the-fly?](https://forums.swift.org/t/extract-swift-package-on-the-fly/77612)

<div class="topic-metadata">

**Author:** [@CodebyCR](https://forums.swift.org/u/CodebyCR)\
**Replies:** 1\
**Last updated:** [February 2, 2025, 11:37pm UTC](https://forums.swift.org/t/extract-swift-package-on-the-fly/77612 "2025-02-02T23:37:48Z")

</div>

Hey there, is there any kind of 'Extract Group / Folder as Swift Package' - function in Xcode or better in Swift Package Manager directly? Thx

---

## [Xcodebuild assuming highest minimum deployment target for package dependencies with no explicit platform](https://forums.swift.org/t/xcodebuild-assuming-highest-minimum-deployment-target-for-package-dependencies-with-no-explicit-platform/76810)

<div class="topic-metadata">

**Author:** [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Replies:** 7\
**Last updated:** [January 1, 2025, 6:11pm UTC](https://forums.swift.org/t/xcodebuild-assuming-highest-minimum-deployment-target-for-package-dependencies-with-no-explicit-platform/76810 "2025-01-01T18:11:35Z")

</div>

I'm using swift-create-xcframework to create an XCFramework from my Swift package. I have combed through the source code and I don't think this tool is the problem, though it will obviously need to be updated with whatev…

---

## [SPM dynamic library producing 2 instances for some packages in Xcode](https://forums.swift.org/t/spm-dynamic-library-producing-2-instances-for-some-packages-in-xcode/70047)

<div class="topic-metadata">

**Author:** [@mark](https://forums.swift.org/u/mark)\
**Replies:** 2\
**Last updated:** [December 28, 2024, 8:46pm UTC](https://forums.swift.org/t/spm-dynamic-library-producing-2-instances-for-some-packages-in-xcode/70047 "2024-12-28T20:46:10Z")

</div>

I'm trying to link all of my SPM dependencies as dynamic libraries. However, at runtime I'm getting symbol collision warnings. Class TtC9FrameworkA43Class is implemented in both ../DerivedData/MyApp-rynwnsmwl/Build/Pro…

---

## [How on earth can I create a .framework from a Swift package?](https://forums.swift.org/t/how-on-earth-can-i-create-a-framework-from-a-swift-package/76797)

<div class="topic-metadata">

**Author:** [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Replies:** 5\
**Last updated:** [December 26, 2024, 6:50am UTC](https://forums.swift.org/t/how-on-earth-can-i-create-a-framework-from-a-swift-package/76797 "2024-12-26T06:50:10Z")

</div>

According to the responses on this post, Package.swift is no longer intended to be "convertible" to an Xcode project. This eliminates the ability to generate Xcode-specifc products such as .frameworks, since SPM doesn't …

---

## [Modules vs Packages in SwiftPM](https://forums.swift.org/t/modules-vs-packages-in-swiftpm/73098)

<div class="topic-metadata">

**Author:** [@EngOmarElsayed](https://forums.swift.org/u/EngOmarElsayed)\
**Replies:** 12\
**Last updated:** [November 26, 2024, 6:45pm UTC](https://forums.swift.org/t/modules-vs-packages-in-swiftpm/73098 "2024-11-26T18:45:51Z")

</div>

I watched the swift tour from WWDC 24 and they explained that a package consists of modules and you can use package access control to access code between modules, vs. internal which makes the code only accessed through t…

---

## [Making dependencies writable in Xcode package project](https://forums.swift.org/t/making-dependencies-writable-in-xcode-package-project/31090)

<div class="topic-metadata">

**Author:** [@JetForMe](https://forums.swift.org/u/JetForMe)\
**Replies:** 9\
**Last updated:** [November 12, 2024, 11:55pm UTC](https://forums.swift.org/t/making-dependencies-writable-in-xcode-package-project/31090 "2024-11-12T23:55:45Z")

</div>

I'm using Xcode to develop an SPM-based executable, and I’ve run into a situation where I’d like to be able to edit the source code of one of my dependencies. Xcode conveniently lets me navigate to the dependency’s sourc…

---

## [BuildTool Plug-in. SPM Build Tool Plugin Issue in Xcode – Generated Files Not Found](https://forums.swift.org/t/buildtool-plug-in-spm-build-tool-plugin-issue-in-xcode-generated-files-not-found/75021)

<div class="topic-metadata">

**Author:** [@AlexApriamashvili](https://forums.swift.org/u/AlexApriamashvili)\
**Replies:** 0\
**Last updated:** [September 30, 2024, 4:45am UTC](https://forums.swift.org/t/buildtool-plug-in-spm-build-tool-plugin-issue-in-xcode-generated-files-not-found/75021 "2024-09-30T04:45:59Z")

</div>

Help Needed: Hi everyone, I've run into a frustrating issue while trying to create a build tool plugin for some targets in SPM that have associated resource bundles. I'm using Xcode, and things go wrong when I try to bu…

---

## [Challenges setting up a Swift Package Registry Server generated with swift-openapi-generator](https://forums.swift.org/t/challenges-setting-up-a-swift-package-registry-server-generated-with-swift-openapi-generator/74288)

<div class="topic-metadata">

**Author:** [@mackoj](https://forums.swift.org/u/mackoj)\
**Replies:** 7\
**Last updated:** [August 31, 2024, 8:14pm UTC](https://forums.swift.org/t/challenges-setting-up-a-swift-package-registry-server-generated-with-swift-openapi-generator/74288 "2024-08-31T20:14:31Z")

</div>

Hi, I’m currently trying to setup a Swift Package Registry(SE-0292 / SE-0321) server using swift-openapi-generator based on the official YAML file: registry.openapi.yaml. The goal is to securely store and share our inte…

---

## [Cannot use swift-markdown in package built for distribution](https://forums.swift.org/t/cannot-use-swift-markdown-in-package-built-for-distribution/74243)

<div class="topic-metadata">

**Author:** [@dfeinzimer](https://forums.swift.org/u/dfeinzimer)\
**Replies:** 1\
**Last updated:** [August 29, 2024, 11:57pm UTC](https://forums.swift.org/t/cannot-use-swift-markdown-in-package-built-for-distribution/74243 "2024-08-29T23:57:09Z")

</div>

Hello I've already opened an issue for this in the swift-markdown repo but I figure I'd also try here. I'm looking to consume swift-markdown as a package dependency but am hitting an issue with my daily CI job which arc…

---

## [Status of swift-testing on windows/linux](https://forums.swift.org/t/status-of-swift-testing-on-windows-linux/72551)

<div class="topic-metadata">

**Author:** [@mikewoodworth](https://forums.swift.org/u/mikewoodworth)\
**Replies:** 5\
**Last updated:** [August 1, 2024, 4:57pm UTC](https://forums.swift.org/t/status-of-swift-testing-on-windows-linux/72551 "2024-08-01T16:57:08Z")

</div>

Hello, We're interested in moving to swift-testing for our cross platform project, so we can take advantage of consistent tests across our Mac, Windows and Debian CI bots (via SPM). Im seeing conflicting info though on …

[Next page](https://forums.swift.org/tag/spm/21.md?match_all_tags=true&page=1&tags%5B%5D=spm)
