I have several Swift packages in my project.
Works fine with Xcode 13.4.1.
Using Xcode 14 beta 1, all packages fail to build because of an error referencing to one of my packages:
Showing All Messages
Cannot clone from local directory /Users/...
Please git init or use "path:" for Location(scratchDirectory...
I tried:
Clean Build Folder and Reset Package CachesThe packages are part of the project (when creating: ... add to project and directory in the project)
There is a change in the syntax for local packages, the .package(url: … syntax that used to work for packages within the project does not work anymore.
With Xcode 14 local packages that do no have their own repo MUST be referred as:
dependencies: [
.package(path: "../MyLibrary"),
]
Now this works just fine in Xcode 14 beta, but if you're going back to the Xcode release version, you'll get numerous errors. To fix those, reset the package caches by calling
File > Packages > Reset Package Caches
I had the same issue in a project with 14 internal packages, some of them dependent on each other, and it runs fine now in both Xcode 13.4 and Xcode 14 beta.
Hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With