Questions tagged [swift-package]

103 questions
4
votes
3 answers

Add forked Swift Package in Xcode project

I recently forked a Swift Package library from GitHub in order to implement a functionality that I've been missing. However, when I try to add my version of the package in a Xcode project (by adding the url of my fork), Xcode can't find any…
ajpallares
  • 777
  • 4
  • 16
4
votes
0 answers

Swift Package Manager: shallow clone

The problem: I'm using the nlohmann/json package with Swift Package Manager. Package.swift manifest file By looking at the package manifest, it's clear that the library includes just a single file and a header. However, in order to install the…
3
votes
3 answers

Swift package C header errors

My C library compiles and gets packaged into an xcframework without a problem, but my Swift project that uses this through a Swift Package then has some errors... Namely, I'm getting Token is not a valid binary operator in a preprocessor…
Crag
  • 1,723
  • 17
  • 35
3
votes
1 answer

Remove google maps and keep google places package ios

I have my SwiftUI app where I am only using import GooglePlaces. To use Google Places I had to install the package from: https://github.com/YAtechnologies/GoogleMaps-SP The problem is that when I am trying to release the app, more package will…
3
votes
1 answer

Cannot access Swift Package xcassets

I'm trying to use a color set from a xcassets folder that is inside a Swift Package (src). It doesn't seem to be working. I tested this out by writing a simple view that attempts to make use of the color: Text("Hello") …
Kelvin Lau
  • 6,373
  • 6
  • 34
  • 57
3
votes
0 answers

Xcode Cloud Failing on Archive due to Swift Package

I have a Swift Package (GeoSwift) that I’m including in a project I’m trying to set up with Xcode Cloud for a build / archive / release for Test Flight workflow. When running that build I keep getting the error shown in the screenshot at the last…
narner
  • 2,908
  • 3
  • 26
  • 63
3
votes
0 answers

How to use Swift Packages in Visual Studio Code?

I'm new with Swift and all this tools. I've tried to look for guides but they didn't help me. I wanna try to work with packages in VS code.So I decided to add a SwiftyJSON package. This is my Package.swift file: import PackageDescription let…
3
votes
1 answer

ITMS-90334: Invalid Code Signature Identifier when building via Xcode Cloud

I have started a small collection of helper code in a Swift Package for my own needs. If i include this package in my main project using Swift Package Manger and try to build it using Xcode Cloud, i get the following error: ITMS-90334: Invalid Code…
Maciej Swic
  • 11,139
  • 8
  • 52
  • 68
3
votes
1 answer

swift build: warning: '--product' cannot be used with the automatic product 'ProductName'; building the default target instead

I have a Package.swift manifest as follows: // swift-tools-version:5.4 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name:…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
2
votes
1 answer

Naming conflict with the Swift StreamVideo SDK

How can I solve a naming conflict between e.g. a local User object and the same object name in the StreamVideo SDK? Regular imports can lead to problems with existing project files that have the same names. Also, there can be a conflict with the…
Stefan Blos
  • 172
  • 7
2
votes
0 answers

The package product 'SwiftSyntaxMacros' requires minimum platform version 10.15 for the macOS platform, but this target supports 10.13

I created a new swift macro package in my Xcode project. My Package.swift looks like: import CompilerPluginSupport import PackageDescription let package = Package( name: "TestMockable", platforms: [.iOS(.v14)], products: [ .library( …
2
votes
1 answer

Unable to build a Swift package after adding the `RxSwift` package dependency: "product 'RxCocoa' not found"

I have created a new Swift package and trying to use the RxSwift dependency within it. I followed these instructions to add the dependency but my package is unable to build after this with the following error: product 'RxCocoa' required by package…
Mando
  • 11,414
  • 17
  • 86
  • 167
2
votes
1 answer

Xcode 14: Custom templates don't appear in Swift Package file creation

I'm in a bit of a pickle. I created custom files templates for my Xcode projects. In a normal project environment my custom templates appear when I access the New file creation popover as you can see in the following screenshoot These templates are…
Martin
  • 843
  • 8
  • 17
2
votes
0 answers

Error while installing Swift Package - unable to access /Package.swift

I recently added a Swift Package (IQKeyboardManager) from GitHub on to my xcworkspace Project. The Package.swift file is in the root folder of the repository. However, I got an error: /Package.swift cannot be accessed Unable to resolve the…
2
votes
1 answer

How can I conditionally depend on a system library for desktop vs iOS?

I'm working on a Swift package that should depend on GLFW only on desktop (MacOS or Linux), but not for iOS, since GLFW does not build for iOS. How would I go about this? I have a system library defined like so: import PackageDescription let…
sak
  • 2,612
  • 24
  • 55