Questions tagged [swiftpm]

Swift Package Manager, tool for swift code distribution

From the home page: The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

35 questions
2
votes
1 answer

update SwiftPM with XcodeGen

I'm using XcodeGen to automate the project generation and I'm new to XcodeGen. Can anyone help me how to update any SwiftPM dependency (ex: Facebook or SDWebImage) when XcodeGen is integrated? Currently when I update any SwiftPM dependency and run…
sumeet
  • 21
  • 1
2
votes
1 answer

Swift package calling /usr/bin/swift errors with `Failed to open macho file...Too many levels of symbolic links` only when running from Xcode

I am developing a command line app in Swift which will call out to swift in order to initialize packages, compile things, test things, etc. I am using the swift package manager and Xcode. In my tool, I call swift from a Process. If I am running my…
deaton.dg
  • 1,282
  • 9
  • 21
1
vote
1 answer

How to support Xcode Templates for SwiftPM?

I have Xcode Template that generate a bunch of files (not project) with some predefined repetitive code (for example classes for MVVM pattern). When I try to create these files in Xcode Project all works fine (I can find and create my templates in…
pacification
  • 5,838
  • 4
  • 29
  • 51
1
vote
0 answers

Swiftc arguments in Swift Package

I hava a Swift Package with an executable target, the project structure looks like this: MySwiftPackage ├── Package.swift ├── Sources │   └── MySwiftPackage │   ├── SwiftBridgeCore.swift │   ├── main.swift │   └── my_rust_lib.swift ├──…
Jomy
  • 514
  • 6
  • 22
1
vote
1 answer

How to export localization data in XLIFF format from a SwiftPM Package

I am developing an iOS application where most of the source code is in targets/modules within local SwiftPM package. This package is imported by a Xcode project that contains the app target. I am trying to find a way to export all the localizable…
Christos Koninis
  • 1,499
  • 1
  • 15
  • 28
1
vote
1 answer

how to add a new dependency to vapor?

I want to add a new dependency to vapor, but this error comes out - unknown package 'Web3' in dependencies of target 'App'; valid packages are: 'vapor', 'fluent', 'fluent-postgres-driver', 'jwt', 'Web3.swift' // swift-tools-version:5.5 import…
1
vote
0 answers

Xcode 12.5.1 (or git) keeps deleting Package.resolved from our repo

I'm on a team of three developers working on an Xcode project that uses SPM dependencies (only; no Cocoapods, etc). Our repo is hosted at Github. Proj.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved was initially committed to the…
Rick
  • 3,298
  • 3
  • 29
  • 47
1
vote
1 answer

Make SwiftUI app appear in the macOS Dock

I'm a complete noob at macOS UI programming. Last time I did that was sometime in the 20th century using Visual Mac Standard Basic or REALbasic… I'm trying to build a graphical UI to interact with some algorithms written in Swift using SwiftUI. I…
Feuermurmel
  • 9,490
  • 10
  • 60
  • 90
1
vote
2 answers

Use libusb in a MacOS GUI application

I'm trying to use libusb in a macOS application with GUI. But I always fail with "No such module 'CLibUSB'". I could use CLibUSB in a command line application, but cannot get it to work with a macOS GUI application. What I did: brew install…
Fritz
  • 95
  • 7
1
vote
2 answers

PDFKit symbols missing from Swift Package error

I am trying to build a swift package that has a dependency on a framework, but that downstream framework is throwing an error. Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_PDFDocument", referenced from: objc-class-ref in…
bobby123uk
  • 892
  • 4
  • 17
1
vote
0 answers

swiftpm use binaryTarget got an error 'no such module' when archive

I'm trying to refactor the project using swiftpm and everything works fine, both in the emulator and on my iPhone device. But when I archive the project, I get an error 'no such module 'SFS2XAPIIOS''. Here's the code of my Package.swift: //…
IWECon
  • 36
  • 5
1
vote
2 answers

Duplicate symbols with CocoaPods and SwiftPM

Ever since Xcode11 we've been migrating from CocoaPods to SwiftPM. Unfortunately some of the dependencies don't have SwiftPM support yet. Like Firebase. This isn't a real problem, since both of them can coexist next to eachother. But since (I think…
basvk
  • 4,437
  • 3
  • 29
  • 49
0
votes
0 answers

Objective-C target not access in Swift target in local package (SwiftPM)

I have two target in Swift package manager, one is Objective-C target and another one is Swift target. I have few Custom components in Objective-C target and need to access those components in Swift target. I have added Objective-C target as…
0
votes
0 answers

Add target to swift package

I hope to ask this correctly, but let me know if clarification is needed. I developed a standalone app that displays data to the user (not important). I have a swift package that I would like to add this app (target) too, so that the package can be…
texasRanger009
  • 139
  • 1
  • 9
0
votes
1 answer

SwiftPM: xcodebuild can't find scheme though it is there

I'm using xcodebuild with the -workspace . option to build a Swift Package (a framework) for iOS (swiftbuild only builds for MacOS) in a Github Action. It works for all of our packages, except 2, where we get the error xcodebuild: error: The…
uliwitness
  • 8,532
  • 36
  • 58