Quantcast
Channel: Package Manager - Swift Forums
Browsing latest articles
Browse All 64 View Live

Is it possible to use @import in a header file?

I've created a package with the following structure: Models - Swift UseObjc - Objc, depends on Models UseSwift - Swift, depends on UseObjc The idea is to use an enum from Models as a property of an...

View Article



Image may be NSFW.
Clik here to view.

Cannot resolve dependency with SwiftPM

I have two dependencies. The first is: GitHub - liveview-native/liveview-client-swiftui and I install Exact Version: 0.3.0-alpha.3. This installs OK. The 2nd dependency is GitHub -...

View Article

Image may be NSFW.
Clik here to view.

Add Swift SDK info in PD context

I see we have added Git information on PD context recently. github.com/apple/swift-package-manager Add git information to PD context apple:main ← apple:add-git-info-to-context opened 09:56PM - 14 Dec...

View Article

Will local or remote version of a package dependency in an app be bundled...

I have an Xcode project called App. App has a remote dependency on a package called Service. Because I'll be making frequent changes to Service, I've also added it as a local dependency to App. When I...

View Article

Image may be NSFW.
Clik here to view.

The Objective-C Burger

There is a Swift package issue when Swift depends on Obj-C and that Obj-C depends on Swift (in 3 targets/packages) There is more background here but it has been raised several times throughout the...

View Article


SE-0273 and Configuration Conditionals

The status page for SE-0273 states: Status: Partially implemented (Swift 5.3 supports platform conditionals, but not configuration conditionals) I'd like to do exactly as the proposal states: In a...

View Article

How is --show-codecov-path intended to be used?

Continuing the discussion from How is --enable-code-coverage intended to be used?: At the end of this thread @SDGGiesbrecht announced the addition of a feature to show where the coverage file is...

View Article

Problem including a C Library with Swift executable using SwiftPM

I am having a really frustrating time trying to get a non-system C library to work with the SPM. I have tried everything including talking to ChatGPT 3.5 to help me out. Everything I have looked at on...

View Article


Strange error raises when building SwiftPM

This error raised when I was trying to build SwiftPM locally on my Windows machine: ......

View Article


SwiftPM can't dynamically link resources

I'm writing a tutorial about how to use SPM to create dynamic frameworks to share code between an app and plugins without the duplication in the final binary which comes from embedding static...

View Article

Swift Package dependency in package A not seen when building package B...

Hello all, I'm currently stuck with the following issue : I have a Swift package containing Swift code named Common. This package is a dependency of another Swift package which contains ObjC code,...

View Article

Warnings as errors in sub packages

Hello, We're having some problems with using warnings-as-errors in new Xcode versions. I've searched online and no-one is talking about this issue so here goes... Our project is split up into multiple...

View Article

Should SwiftPM diagnose missing dependencies?

i wasted a lot of time today trying to debug an issue, which ended up being because SwiftPM was not actually recompiling my code when performing incremental builds. this happened because a test target...

View Article


Importing local XCFramework to local swift package

Hello everyone! I'm starting modularization in my project, so inside my app's project I created one xcframework - AppNameServices and one swift package - AppNameUI. Can AppNameServices(xcframework) be...

View Article

Image may be NSFW.
Clik here to view.

Swift Package dependency managment

HI team I have a question with the SPM dependency management. Lets say my SDK named ASDK. In the ASDK, I use BSDK(=> GSDK, HSDK, ISDK), CSDK, DSDK as its dependency. For an application FAPP, the...

View Article


How to detect a SwiftPM project without cloning full repo?

i am building a tool that needs to be able to detect if an arbitrary git repository (possibly) contains a SwiftPM project. i would like the tool to be able to do this without performing a full clone...

View Article

When should one use Targets instead of Packages in Swift Package Manager?

I am trying to understand the best practices for organizing dependencies in a Swift project using Swift Package Manager. I have come across the concepts of Targets and Packages, but I am unsure of...

View Article


Xcode compiles all packages all the time. Is there a way to stop it?

I have this project with a lot of local and remote Swift Packages. Every time I build the project, the packages get compiled. I waste hours waiting for the compiler to finish. I am using the default...

View Article

Image may be NSFW.
Clik here to view.

Trouble Adding OpenAPIGenerator Plugin to Run Build Tool Plug-ins in Xcode...

I'm using SPM in my project and am trying to integrate Apple/swift-openapi-generator. My project is divided into several modules, for which I'm using SPM. To manage dependencies, I have a...

View Article

Swift package manager dependencies

Hi, I have a PackageA that uses swift code and has a dependency on a PackageB that also uses swift code only. In the main hosting app, I would like to just import PackageA and use the classes of...

View Article

Image may be NSFW.
Clik here to view.

Can't add SwiftPM testTarget to Xcode test plan

In my project, I've broken out some components into local SPM packages. In Xcode, I've added these packages and the project compiles as expected. The SPM's have unit tests in a .testTarget and when I...

View Article


SwiftPM manual cache management?

i have a CI/CD system that consumes a lot of network bandwidth downloading git repositories from GitHub. this happens because the build system clears the SwiftPM cache (.swiftpm/cache/repositories)...

View Article


Why does breaking up SwiftPM targets list cause typechecking to fall off a...

i have a package manifest with a lot (>100) targets that was basically impossible to navigate. so i wanted to break it up into collapsible sections like this: var a:[Target] { [ // targets ... ] }...

View Article

Swift dependencies in private Github repos

How do I add dependencies to a Swift Package, if those dependencies are in private repos? This works in the Package file, but exposes my personal access token if I commit it:...

View Article

Image may be NSFW.
Clik here to view.

BuildToolPlugin 'Multiple commands produce ...' error when embedding wachOS...

I'm an author of a tool called xcstrings-tool that offers a BuildToolPlugin to generate Swift source code for accessing localized strings that are declared in an Xcode Strings Catalog. While BuildTool...

View Article

Browsing latest articles
Browse All 64 View Live




Latest Images