skip to Main Content

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.

2

Answers


  1. Chosen as BEST ANSWER

    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.


  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search