SwiftPM: non-essential "hardening" flags for the C compiler
I have an Objective-C framework that is also distributed as a Swift Package. Recently I updated the Xcode project to pass hardening flags to the C compiler. As the package maintainer should I also...
View ArticleGet a list of system libraries from the dependency graph
Hi Swift Community, I'm working on a program or script that can analyze a Swift Package Manager (SPM) dependency graph and return all the system libraries declared in .systemLibrary targets across the...
View ArticleSwiftPM seems to be cloning unnecessary dependencies
it looks like (on Swift 6.0.3 at least) that SwiftPM eagerly clones all transitive package dependencies if just one product from that package is included in the build, even if that product depends on...
View ArticleWorking around limitations in Swift Package Manager for binary distribution
With the impending end of CocoaPods in sight, I'm once again assessing how SwiftPM can meet our needs to distribute the XCFramework SDK that we ship with Reveal. Out of the box, SwiftPM isn't up to...
View ArticleStatus of compilation of dependencies with optimizations in debug mode
this was asked a year ago, but with zero response from anyone responsible for SwiftPM at the time. what is the status of enabling dependencies to be compiled with release optimizations, but compiling...
View ArticleFirst Swift Testing tests has been included in swift-package-manager project
Hello folks, I wanted to write this quick message to the community informing you all the the Swift Package Manager project repository has support for the Swift Testing tests. A "canary" test was added...
View ArticleSwiftPM with xcframeworks in derived data
When I build the project there are no build errors, but when I run unit tests it says the following message. Undefined symbols for architecture arm64: "_OBJC_CLASS_$_Class1", referenced from: in...
View ArticleSwiftPM making `@_exported import` visible to objc clients
Hello SwiftPM community I have a specific use case which I want to achieve, but I lack the linking knowledge to figure this out on my own. I have a framework A, which relies on framework B under the...
View ArticleCan You (Dynamically) Link Swift Libraries on Linux?
this is something that has bedeviled generations and generations of Swift Developers for hundreds of years! SwiftPM and dynamic linking Use a dynamic library in a swift package on Linux Swift shared...
View ArticleCondition SwiftPM switch based on Build Configuration
Is it possible to have selective SPM based on Scheme as dependency . I have the following SPMs. MainSPM => can either use SPMDebug or SPMTesting. Here is how my package file in MainSPM looks like....
View ArticleFoundation forced linking in SwiftPM with no "import Foundation", other...
Adding resources to targets in Package.swift leads to generating resource_bundle_accessor.swift which imports Foundation even if there is no "import Foundation", other imports or dependencies. //...
View ArticleExclude emacs files in Package.swift
This seems to be easy but I couldn’t figure out how to exclude emacs files (like main.swift~) in Package.swift files to get rid of the warnings when compiling. I tried variations of exclude:...
View ArticleXcodebuild with SwiftPM signs iOS Simulator framework but not iOS framework
Hi there, this is Riccardo, SWE @ Meta and core maintainer of React Native. This half we are moving away from Cocoapods and we are exploring Swift PM as alternative to build React Native from source...
View ArticleXcodebuild does not generate Headers if the source is Swift PM
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...
View ArticleXCTest xUnit Experimental failure messages
Hello folks, Currently, when running swift test --parallel --xunit-output <myfile> , Swift Package Manager can generate up to two files, one for XML for XCTest and another for Swift Testing. If...
View ArticleHow does SwiftPM query for package versions from GitHub?
A while back I asked a question about iterating over swift-syntax versions: How to iterate through set of exact dependency versions for swift package using command line? Package Manager Hi! I'm...
View ArticleApproaches for testing environment-dependent SwiftPM behavior?
as i’m working on improving the test coverage for the [Pitch] Replaceable Library Plugins feature, i’m running into a conundrum where we need to be able to test that SwiftPM can use a precompiled...
View ArticlePackage.resolved location not consistent (maybe user settings)
Hey everyone. I just wanted to ask for any hint / documentation what might could cause for different user getting different Package.resolved location values? Some have ssh://git@....../xxx.git some...
View ArticleHow to use swiftPM manager different framework and core framework in a...
I have a multi-target Xcode Project where different targets depend on both a Core Framework and their own target-specific SDK Frameworks. How should I handle migrating from CocoaPods to SwiftPM for...
View ArticleMy experience trying to port a Swift CLI to run on Windows
I've been exploring ways to port a macOS CLI, joyfully built with Swift, into Windows. While I've encountered some challenges, I'm excited about the future possibilities and wanted to share my...
View ArticleSwiftPM - Possible to build individual targets in Xcode?
I have a Xcode project that has multiple local Swift Packages. Consider the following Package.swift file as an example: let package = Package( name: "SomeFeature", products: [ .library(name:...
View ArticleUpdate to swift package init executable template
Hi all, I've been working on some changes to swift package init --type executable to improve scalability and maintainability based on feedback from the SwiftPM community. If you're interested in the...
View ArticleWindows Self Hosted pipeline
Hello folks, I would like to inform you that a new pipeline has been mark as required for all Swift Package Manager PR targeting branch main, and subsequent release branches. This pipeline is a...
View ArticleBuilding a C target without -fmodules?
I am trying to package GitHub - sctplab/usrsctp: A portable SCTP userland stack with SPM to use it as a dependency in my swift library. What I get is: Sources/usrsctp/src/user_inpcb.h:106:8 type...
View ArticleSwift 6.1 and "redefinition of module"
After upgrading (Xcode) to Swift 6.1, one of my projects failed to compile. It prompted redefinition of module 'CLib' during compilation. The simplified project (source code can be found here...
View Article