0

My app using SPM package dependencies used to throw a different error on Xcode 13.2.1. When I switched to use Xcode 13.3, I suddenly started getting

Error: missingKey("url")

Has something changed with Package.swift syntax in Xcode 13.3 that would give this error? The app builds with a script from command line.

Parth
  • 2,682
  • 1
  • 20
  • 39

2 Answers2

1

There are some changes on SPM with Xcode 13.3, for example one of my packages had a dependency to another package, and I had to change how to specify that dependency.

From (not working anymore on Xcode 13.3)

.package(name: "PackageName", url: "https://github.com/orgname/package.git", .branch("main"))

To (working on Xcode 13.3)

.package(url: "https://github.com/orgname/package.git", branch: "main")

Maybe you have a similar setup.

vicegax
  • 4,709
  • 28
  • 37
0

The issues was with SPM version specified in Package.swift

I was using // swift-tools-version:5.3. Xcode 13.3 needs this to be // swift-tools-version:5.6.

Parth
  • 2,682
  • 1
  • 20
  • 39