# \#xcodebuild

**URL:** https://forums.swift.org/tag/xcodebuild/266.md

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

---

## [Slow incremental builds because of planning swift module](https://forums.swift.org/t/slow-incremental-builds-because-of-planning-swift-module/84803)

<div class="topic-metadata">

**Author:** [@JoeSzymanskiNoom](https://forums.swift.org/u/JoeSzymanskiNoom)\
**Replies:** 16\
**Last updated:** [October 5, 2026, 8:29am UTC](https://forums.swift.org/t/slow-incremental-builds-because-of-planning-swift-module/84803 "2026-10-05T08:29:35Z")

</div>

We have been running into a recurring issue causing our builds in Xcode to take significantly longer than expected. Sometimes when generating incremental builds, even ones with zero actual changes, the build can suddenly…

---

## [Swift test + RealityKit custom component decode mismatch (has == true, typed decode == nil) — minimal repro](https://forums.swift.org/t/swift-test-realitykit-custom-component-decode-mismatch-has-true-typed-decode-nil-minimal-repro/84937)

<div class="topic-metadata">

**Author:** [@mesqueeb](https://forums.swift.org/u/mesqueeb)\
**Replies:** 5\
**Last updated:** [September 19, 2026, 7:17pm UTC](https://forums.swift.org/t/swift-test-realitykit-custom-component-decode-mismatch-has-true-typed-decode-nil-minimal-repro/84937 "2026-09-19T19:17:37Z")

</div>

Hi all, I’m seeing what looks like a mismatch specifically when running tests via SwiftPM CLI (swift test), and I’m not sure whether this should be tracked as SwiftPM, Swift Testing, or RealityKit. I made a minimal rep…

---

## [Linux only dependency leads to resolving error for iOS](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036)

<div class="topic-metadata">

**Author:** [@bioche](https://forums.swift.org/u/bioche)\
**Replies:** 9\
**Last updated:** [January 11, 2026, 9:06pm UTC](https://forums.swift.org/t/linux-only-dependency-leads-to-resolving-error-for-ios/84036 "2026-01-11T21:06:21Z")

</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 · GitH…

---

## [XCode 15.3 / XCBuildService Crash - Infinite loop when building iOS Project](https://forums.swift.org/t/xcode-15-3-xcbuildservice-crash-infinite-loop-when-building-ios-project/70643)

<div class="topic-metadata">

**Author:** [@acsarraf-HF](https://forums.swift.org/u/acsarraf-HF)\
**Replies:** 9\
**Last updated:** [January 7, 2026, 9:08am UTC](https://forums.swift.org/t/xcode-15-3-xcbuildservice-crash-infinite-loop-when-building-ios-project/70643 "2026-01-07T09:08:18Z")

</div>

Context We have a very large codebase in our company 600k+ Lines of Code. The setup is a XcodeProj using Swift Package Manager as the only and main package management tool. We have started a long journey of modularizing …

---

## [Compiler flags for SwiftPM source & binary packages in Xcode](https://forums.swift.org/t/compiler-flags-for-swiftpm-source-binary-packages-in-xcode/81899)

<div class="topic-metadata">

**Author:** [@shishawn](https://forums.swift.org/u/shishawn)\
**Replies:** 0\
**Last updated:** [September 1, 2025, 6:51am UTC](https://forums.swift.org/t/compiler-flags-for-swiftpm-source-binary-packages-in-xcode/81899 "2025-09-01T06:51:27Z")

</div>

What compiler flags should be passed for SPM source & binary packages in Xcode when driving SourceKit-LSP via BSP? Tags: SourceKit-LSP, SwiftPM, BSP, Xcode Context I’m building a BSP server to drive SourceKit-LSP for X…

---

## ["Missing required module 'X" error in Xcode after setting language version to Swift 6](https://forums.swift.org/t/missing-required-module-x-error-in-xcode-after-setting-language-version-to-swift-6/77109)

<div class="topic-metadata">

**Author:** [@osv](https://forums.swift.org/u/osv)\
**Replies:** 6\
**Last updated:** [June 17, 2025, 4:23pm UTC](https://forums.swift.org/t/missing-required-module-x-error-in-xcode-after-setting-language-version-to-swift-6/77109 "2025-06-17T16:23:58Z")

</div>

We're using CocoaPods in our project and we noticed the compiler fails to build some modules with "Missing required module 'x'" error when built in Swift 6. I've set up a demo project with some repro steps where there i…

---

## [Using -lto=llvm-full/thin with xcodebuild](https://forums.swift.org/t/using-lto-llvm-full-thin-with-xcodebuild/79931)

<div class="topic-metadata">

**Author:** [@weliveindetail](https://forums.swift.org/u/weliveindetail)\
**Replies:** 10\
**Last updated:** [May 28, 2025, 2:42pm UTC](https://forums.swift.org/t/using-lto-llvm-full-thin-with-xcodebuild/79931 "2025-05-28T14:42:02Z")

</div>

Xcode 16.3 ships Apple Swift version 6.1 and I can use it on the command-line to build a hello world example with link-time optimization: \> cat main.swift print("Hello world") \> swiftc -O main.swift -lto=llvm-full -o lt…

---

## [Mixing Swift build tool versions (in Xcode)](https://forums.swift.org/t/mixing-swift-build-tool-versions-in-xcode/80014)

<div class="topic-metadata">

**Author:** [@bnickel](https://forums.swift.org/u/bnickel)\
**Replies:** 0\
**Last updated:** [May 20, 2025, 5:58pm UTC](https://forums.swift.org/t/mixing-swift-build-tool-versions-in-xcode/80014 "2025-05-20T17:58:33Z")

</div>

Our team is preparing to upgrade our CI pipeline from Xcode 15.0.1 to Xcode 16.0 and a question came up about bidirectional compatibility since we have several modules that depend on each other. To set things up, let's …

---

## [Build times regression with Explicitly Built Modules](https://forums.swift.org/t/build-times-regression-with-explicitly-built-modules/77073)

<div class="topic-metadata">

**Author:** [@chiragramani](https://forums.swift.org/u/chiragramani)\
**Replies:** 7\
**Last updated:** [March 19, 2025, 11:39pm UTC](https://forums.swift.org/t/build-times-regression-with-explicitly-built-modules/77073 "2025-03-19T23:39:49Z")

</div>

Hi, We’ve been exploring the Explicitly Built Modules feature introduced in WWDC 2024 to understand its impact on build times. Observation: Enabling the feature resulted in a significant build time regression. Despite…

---

## [Xcodebuild does not generate Headers if the source is Swift PM](https://forums.swift.org/t/xcodebuild-does-not-generate-headers-if-the-source-is-swift-pm/77856)

<div class="topic-metadata">

**Author:** [@cipolleschi](https://forums.swift.org/u/cipolleschi)\
**Replies:** 0\
**Last updated:** [February 13, 2025, 4:35pm UTC](https://forums.swift.org/t/xcodebuild-does-not-generate-headers-if-the-source-is-swift-pm/77856 "2025-02-13T16:35:13Z")

</div>

Hi there, Riccardo here, from the React team @ Meta. I'm one of the core maintainers of React Native. We are exploring how to replace Cocoapods with SwiftPM. One of our goals is to produce binaries for ReactNative to di…

---

## [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…

---

## [Xcode 'C++ and Objective-C Interoperability' build setting not getting set](https://forums.swift.org/t/xcode-c-and-objective-c-interoperability-build-setting-not-getting-set/68099)

<div class="topic-metadata">

**Author:** [@vipul](https://forums.swift.org/u/vipul)\
**Replies:** 1\
**Last updated:** [December 31, 2024, 10:56am UTC](https://forums.swift.org/t/xcode-c-and-objective-c-interoperability-build-setting-not-getting-set/68099 "2024-12-31T10:56:17Z")

</div>

I m trying to create an xcode project with cpp-swift interoperability(introduced in xcode15) using cmake xcode generator. I m able to invoke cpp code in swift and vice-versa but when opening the project in xcode, the bui…

---

## [Package 'Echo' build failing with undefined symbols when using swift-create-xcframework](https://forums.swift.org/t/package-echo-build-failing-with-undefined-symbols-when-using-swift-create-xcframework/76811)

<div class="topic-metadata">

**Author:** [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Replies:** 2\
**Last updated:** [December 24, 2024, 1:27am UTC](https://forums.swift.org/t/package-echo-build-failing-with-undefined-symbols-when-using-swift-create-xcframework/76811 "2024-12-24T01:27:15Z")

</div>

Links to swift-create-xcframework, the package I'm building, and Echo. If you're not familiar with Echo, it's a super cool package for Swift reflection written by Apple's very own @Alejandro! The missing symbols are al…

---

## [Building and Distributing a XCTest Dependent Test XCFramework - SwiftVerifyEmittedModuleInterface](https://forums.swift.org/t/building-and-distributing-a-xctest-dependent-test-xcframework-swiftverifyemittedmoduleinterface/75180)

<div class="topic-metadata">

**Author:** [@Llwydbleidd](https://forums.swift.org/u/Llwydbleidd)\
**Replies:** 0\
**Last updated:** [October 5, 2024, 2:57pm UTC](https://forums.swift.org/t/building-and-distributing-a-xctest-dependent-test-xcframework-swiftverifyemittedmoduleinterface/75180 "2024-10-05T14:57:01Z")

</div>

I am trying to build an XCFramework for testing targets that will run only on simulators. This framework depends on the XCTest framework and will expose some XCTest components publicly. Here is an example of my code: Sw…

---

## [How to distribute macros as a binary xcframework?](https://forums.swift.org/t/how-to-distribute-macros-as-a-binary-xcframework/74988)

<div class="topic-metadata">

**Author:** [@timoninas](https://forums.swift.org/u/timoninas)\
**Replies:** 0\
**Last updated:** [September 27, 2024, 2:44pm UTC](https://forums.swift.org/t/how-to-distribute-macros-as-a-binary-xcframework/74988 "2024-09-27T14:44:53Z")

</div>

I'm trying to make an xcframework from my static library (SPM btw) with macros. My script doesn't work properly My SPM declaration of macros: // swift-tools-version: 5.9 // The swift-tools-version declares the minimum …

---

## [Error 'unsupported Swift architecture' in generated -Swift.h file](https://forums.swift.org/t/error-unsupported-swift-architecture-in-generated-swift-h-file/66901)

<div class="topic-metadata">

**Author:** [@asevko](https://forums.swift.org/u/asevko)\
**Replies:** 1\
**Last updated:** [July 17, 2024, 4:26am UTC](https://forums.swift.org/t/error-unsupported-swift-architecture-in-generated-swift-h-file/66901 "2024-07-17T04:26:55Z")

</div>

We are developing a bunch of xcframeworks, that are using some other xcframeworks, that are distributed via cocoapods. Problem After switching to xcode 14 build system, generated headers for our frameworks started looki…

---

## [Exporting localization using xcodebuild with a project containing macros](https://forums.swift.org/t/exporting-localization-using-xcodebuild-with-a-project-containing-macros/70623)

<div class="topic-metadata">

**Author:** [@Playrom](https://forums.swift.org/u/Playrom)\
**Replies:** 4\
**Last updated:** [June 12, 2024, 8:14am UTC](https://forums.swift.org/t/exporting-localization-using-xcodebuild-with-a-project-containing-macros/70623 "2024-06-12T08:14:51Z")

</div>

I've a workspace with multiple packages, and due to the a bug in Xcode I cannot export the app localizations using the Xcode GUI tool, but I need to resort on using a command from terminal xcodebuild -exportLocalization…

---

## [Archiving swift package that supports visionOS requires x86\_64 architecture](https://forums.swift.org/t/archiving-swift-package-that-supports-visionos-requires-x86-64-architecture/71964)

<div class="topic-metadata">

**Author:** [@zkline101](https://forums.swift.org/u/zkline101)\
**Replies:** 2\
**Last updated:** [May 20, 2024, 10:57pm UTC](https://forums.swift.org/t/archiving-swift-package-that-supports-visionos-requires-x86-64-architecture/71964 "2024-05-20T22:57:25Z")

</div>

Hello, I have a swift package that supports visionOS and one of its targets is a xcframework that also support visionOS and when I try to archive that swift package (using xcodebuild archive) I get this error: note: '\<x…

---

## [Invalid XCFramweork when generated with BUILD\_LIBRARY\_FOR\_DISTRIBUTION=YES](https://forums.swift.org/t/invalid-xcframweork-when-generated-with-build-library-for-distribution-yes/71385)

<div class="topic-metadata">

**Author:** [@YpsoEdu](https://forums.swift.org/u/YpsoEdu)\
**Replies:** 0\
**Last updated:** [April 21, 2024, 6:48pm UTC](https://forums.swift.org/t/invalid-xcframweork-when-generated-with-build-library-for-distribution-yes/71385 "2024-04-21T18:48:10Z")

</div>

Hi all, I'm attempting to generate an XCFramework that must maintain ABI stability. The framework is created from an SPM using the following script: #!/bin/bash set -x set -e # Pass scheme name as the first argument …

---

## [Xcodebuild -create-xcframework not working in Xcode 15.0](https://forums.swift.org/t/xcodebuild-create-xcframework-not-working-in-xcode-15-0/67439)

<div class="topic-metadata">

**Author:** [@zkline101](https://forums.swift.org/u/zkline101)\
**Replies:** 5\
**Last updated:** [February 27, 2024, 8:51pm UTC](https://forums.swift.org/t/xcodebuild-create-xcframework-not-working-in-xcode-15-0/67439 "2024-02-27T20:51:11Z")

</div>

Hello! Not really a Swift question, but I thought someone here may have an answer. I have found a weird behavior change when running xcodebuild -create-xcframework in Xcode 15 compared to running it in Xcode 14.3.1. If I…

---

## [How to run \`xctest\` bundle - and how to add \`entitlement\` to a test target?](https://forums.swift.org/t/how-to-run-xctest-bundle-and-how-to-add-entitlement-to-a-test-target/69583)

<div class="topic-metadata">

**Author:** [@oliviermartin](https://forums.swift.org/u/oliviermartin)\
**Replies:** 0\
**Last updated:** [January 23, 2024, 1:36pm UTC](https://forums.swift.org/t/how-to-run-xctest-bundle-and-how-to-add-entitlement-to-a-test-target/69583 "2024-01-23T13:36:26Z")

</div>

I am writing a SPM based project for MacOS. In this project? I need to access MacOS Keychain. I am write a swift test built by SPM testTarget(). I can see it generates a bundle ./.build/x86\_64-apple-macosx/debug/MyProje…

---

## [Create XCFramework and reusing it - simple example "error: no such module" when importing](https://forums.swift.org/t/create-xcframework-and-reusing-it-simple-example-error-no-such-module-when-importing/69466)

<div class="topic-metadata">

**Author:** [@oliviermartin](https://forums.swift.org/u/oliviermartin)\
**Replies:** 1\
**Last updated:** [January 17, 2024, 2:06pm UTC](https://forums.swift.org/t/create-xcframework-and-reusing-it-simple-example-error-no-such-module-when-importing/69466 "2024-01-17T14:06:19Z")

</div>

Context: I am trying to create a XCFramework that I can reuse it in my Swift app. My example is based on SPM (Swift Package Manager) but I had the same import error no such module when I tried to import my XCFramework in…

---

## [Omitting .private.swiftinterface file when building binary framework](https://forums.swift.org/t/omitting-private-swiftinterface-file-when-building-binary-framework/69110)

<div class="topic-metadata">

**Author:** [@rm\_tp](https://forums.swift.org/u/rm_tp)\
**Replies:** 3\
**Last updated:** [January 2, 2024, 4:39pm UTC](https://forums.swift.org/t/omitting-private-swiftinterface-file-when-building-binary-framework/69110 "2024-01-02T16:39:08Z")

</div>

According to the Swift reference guide for underscored attributes on @\_spi, the .private.swiftinterface file should be generated by adding the -emit-private-module-interface-path compiler option. The issue I am facing i…

---

## [How to emit errors/warnings from build tool plugins for Xcode log](https://forums.swift.org/t/how-to-emit-errors-warnings-from-build-tool-plugins-for-xcode-log/68236)

<div class="topic-metadata">

**Author:** [@JLN](https://forums.swift.org/u/JLN)\
**Replies:** 2\
**Last updated:** [November 15, 2023, 10:24pm UTC](https://forums.swift.org/t/how-to-emit-errors-warnings-from-build-tool-plugins-for-xcode-log/68236 "2023-11-15T22:24:27Z")

</div>

I started by creating a simple CLI tool to detect build settings in a project's pbxproj file using XcodeProj. I figured when it's called from a plugin it could take advantage of the same "Warning: some warning text" magi…

---

## [Unknown argument: '-cxx-interoperability-mode=default'](https://forums.swift.org/t/unknown-argument-cxx-interoperability-mode-default/68085)

<div class="topic-metadata">

**Author:** [@vipul](https://forums.swift.org/u/vipul)\
**Replies:** 1\
**Last updated:** [October 26, 2023, 8:22pm UTC](https://forums.swift.org/t/unknown-argument-cxx-interoperability-mode-default/68085 "2023-10-26T20:22:48Z")

</div>

I am creating an Xcode project using xcode generator in Cmake. The project has a library which contains cpp files and swift files. I m trying to test swift-cpp interoperability that is introduced in xcode15 to perform di…

---

## [SwiftPM package build via xcodebuild with specified derived data path](https://forums.swift.org/t/swiftpm-package-build-via-xcodebuild-with-specified-derived-data-path/59055)

<div class="topic-metadata">

**Author:** [@rlovelett](https://forums.swift.org/u/rlovelett)\
**Replies:** 2\
**Last updated:** [October 12, 2023, 6:57am UTC](https://forums.swift.org/t/swiftpm-package-build-via-xcodebuild-with-specified-derived-data-path/59055 "2023-10-12T06:57:34Z")

</div>

I have a build process that worked with Xcode 12.4 that no longer seems to work with Xcode 13.4. It seems specifying a derived data path breaks the SwiftPM package resolution. $ xcodebuild -version Xcode 13.4 Build vers…

---

## [Some build plug-ins are disabled because they have changed, or have never been enabled. Enable them now?](https://forums.swift.org/t/some-build-plug-ins-are-disabled-because-they-have-changed-or-have-never-been-enabled-enable-them-now/61075)

<div class="topic-metadata">

**Author:** [@narayana](https://forums.swift.org/u/narayana)\
**Replies:** 3\
**Last updated:** [September 9, 2023, 9:00pm UTC](https://forums.swift.org/t/some-build-plug-ins-are-disabled-because-they-have-changed-or-have-never-been-enabled-enable-them-now/61075 "2023-09-09T21:00:36Z")

</div>

I added SwiftLint plugin to my project by following below steps. You can integrate SwiftLint as a Xcode Build Tool Plug-in if you're working with a project in Xcode. Add SwiftLint as a package dependency to your pr…

---

## [Versions \< iOS 11 not supported anymore Xcode 14.3?](https://forums.swift.org/t/versions-ios-11-not-supported-anymore-xcode-14-3/66366)

<div class="topic-metadata">

**Author:** [@cbrzn](https://forums.swift.org/u/cbrzn)\
**Replies:** 2\
**Last updated:** [July 25, 2023, 10:55pm UTC](https://forums.swift.org/t/versions-ios-11-not-supported-anymore-xcode-14-3/66366 "2023-07-25T22:55:11Z")

</div>

Hello, today I updated the version of my xcode to 14.3 and some packages that I used to use are not building anymore (when building those with xcodebuild). After some research I found this thread error in Xcode File not …

---

## [Xcodebuild Update to Latest Package Versions](https://forums.swift.org/t/xcodebuild-update-to-latest-package-versions/55545)

<div class="topic-metadata">

**Author:** [@El\_Cid](https://forums.swift.org/u/El_Cid)\
**Replies:** 5\
**Last updated:** [July 3, 2023, 5:33pm UTC](https://forums.swift.org/t/xcodebuild-update-to-latest-package-versions/55545 "2023-07-03T17:33:03Z")

</div>

Hi all, I would like to obtain the same result as Xcode's Update to Latest Package Versions. I have tried to use: xcodebuild -scheme SchemeName -resolvePackageDependencies However it doesn't appear to always work...

---

## [Xcodebuild fails with 'missing module map file' when compiling framework with a package dependency](https://forums.swift.org/t/xcodebuild-fails-with-missing-module-map-file-when-compiling-framework-with-a-package-dependency/64963)

<div class="topic-metadata">

**Author:** [@MihaMarkic](https://forums.swift.org/u/MihaMarkic)\
**Replies:** 2\
**Last updated:** [May 15, 2023, 11:17am UTC](https://forums.swift.org/t/xcodebuild-fails-with-missing-module-map-file-when-compiling-framework-with-a-package-dependency/64963 "2023-05-15T11:17:01Z")

</div>

I'm trying to create a Framework with a package dependency of EmarsysSDK. xcodebuild compiles fine until I add import EmarsysSDK to start using the added package. Then xcodebuild won't compile anymore with \<unknown\>:0:…

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