How do I implement a Swift Package Manager with resources specific to a platform
I have files like iOS and macOS storyboards and videos that are specific to iOS or macOS respectively. All resources that are specific to iOS are in the Sources/iOS, all resources specific to macOS...
View ArticlePossible to distribute the same module from source & binary in the same package?
Hi, historically I provided a module from source through SPM. I was asked to provide a pre-compiled version of that module to speed up consumer's build time. I am able to build a xcframework with...
View ArticleXcode14 disabel code signing on .bundle
Xcode 14 introduces some mandatory signing on the .bundle. We are building frameworks/xcframework in command line via xcodebuild I have tried -configuration "CODE_SIGNING_ALLOWED=NO,...
View ArticleXCTest of SwiftPM Library hangs indefinitely when its depend on objective-c...
Hi, I have a problem of tests hangs indefinitely when my SPM library depend on objc based Framework, no problem in building the target and if i remove the "BlueStackSDK" dependency the tests passe....
View ArticleSeeking Guidance on Making My First Contribution
Hello Swift community! I am looking to make my first contribution to Swift Package Manager. I would like to know the correct way of contributing. From what I gather the process looks like this: Choose...
View ArticleSwift 5.9. Type 'Bundle' has no member 'module' when building universal...
I'am trying to update my package for using swift 5.9. I used to build an universal executable binary via: /usr/bin/swift build -c debug --package-path ~/work/MyLibrary --cache-path...
View ArticleReference to local module and error 'No such module'
Using Xcode 14.3.1 swift-driver version: 1.75.2 Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) A locally stored package is produced and compiles. The locally stored package...
View ArticleHow to contribute to the Swift Package Manager?
i’m currently trying to help my swift mentorship program mentee make her first contribution to the SPM, and it is not going well because i myself am not able to build the package manager from source...
View ArticleUnexpected size returned for tuple?
I'm using a C library that returns a fixed-length array, which Swift represents as a tuple, but I'd like it as an array to iterate through it. From the debugger screenshot below, in the watch...
View ArticleWhy is fetching dependencies with SwiftPM so slow?
this problem isn’t new to me, but i’ve recently become more conscious of it now that i’ve started doing work in places that have “normal” internet connections, like my neighborhood Starbucks. fetching...
View ArticleBuilding just SPM dependencies to cache in a Docker layer
I'm building a Swift app via Docker. It's got a decent number of SPM dependencies none of which change frequently. While I can cache the resolution of the dependencies like so: COPY ./Package.* ./ #...
View ArticlePackage.swift resolution fails with error about duplicate targets that aren’t...
I have a package with two products and two targets, which have different names, but the package graph won’t resolve. Anyone know why it might think there’s two targets with the same name when there...
View ArticleThe lack of MacOSVersion initializers complicates centralising target...
Currently to specify a platform version for, e.g., MacOS, an opaque enum value is required (PackageDescription.SupportedPlatform.MacOSVersion) and can be specified by e..g .macOS(.v10_15) In cases...
View ArticleSwiftPM Plugin to post-process compiled app
Greetings, I am looking to use SPM plugins to post-process an iOS app after it has been built. Is this possible using buildTool type plugins? Imagine something like my_custom_script.sh...
View ArticleLocal Swift package and app targets
Hello, Quite new at working with SPM here. In our project, we have 2 app targets (each has its own set of assets that apply). Recently, we have created a local Swift package that should loads colors...
View ArticleRebuild times in new shell significantly slower
(cross-posted from Using Swift) I'm seeing some behavior I don't understand in rebuilding / incremental debug builds when they're launched in different instances of the same shell. (bash) Platforms...
View ArticleSwift Doesn’t See ObjC id Properties When Protocol is Defined in a Swift Package
Hello! Going through the process of modularizing some code from a mixed ObjC/Swift codebase by putting into local packages. Facing an issue where Swift is not recognizing an ObjC id<Protocol>...
View ArticleWhy SPM propagate platform requirements when using macros?
I've come across a problem when using macros in my app, which has a minimum deployment requirement of iOS 12. I noticed it is not possible to do so because the minimum version of which SwiftSyntax...
View ArticleSwiftPM not generating testing scaffold when -type=executable
Hi everyone, I notice that when I use SPM to generate the scaffold for an executable: swift package init --type=executable that not test target is added to Package.swift. Is this intended behaviour?...
View ArticleModular local dependencies SPM vs Xcode project
Hello, our team is using mono-repo and managing local modules using Xcode sub-projects. We maintains some code quality across all modules by setup warning policies, using same Swift version, ... in...
View Article