Xcode 14 can't find local package's product

I have a very weird bug where very often Xcode can't find products in local packages and my build fails. Is there a way to at least somehow stabilize the search? I have a very long list (>50) of remote packages added to the workspace and reset a cache takes a very long time and doesn't always help.

Post not yet marked as solved Up vote post of Eimantas Down vote post of Eimantas
1.4k views

Replies

Same. These are 6 local packages (same Git repo), worked as-is in XCode 13. In addition to the main app target not finding them, 4 of the 6 are not navigable at the top, in the Scheme selector. The other 2 are selectable, but say "No Destinations" (and when "No Destinations" is selected, it says "The active scheme has no targets".

Package.swift seems fine/same for all. I've tried removing and re-adding packages with mixed success (it seemed to clear up some errors, but ultimately resulted in others, and I reverted). May try that again.

Have tried "File > Packages > Reset Package Caches" and of course "Clean Build Folder" and restarting XCode and Mac.

I suppose it goes without saying this is a business-critical app, and that I didn't expect to have major local package issues with the update.

  • We've fixed the project on XCode 14 with a combination of adding and removing one package, with healthy amounts of "Reset Package Caches", "Clean Build Folder", and restarting XCode. (Without clearing/resetting, we were not seeing accurate compiler errors).

Add a Comment

Command line tools suddenly don't work. It worked a couple days ago... presumably before I did an update.

I type make -? and it says it can't find make, so it's going to download command line tools... n minutes later (fortunately I have pretty high speed internet) it says it's done, but if I type the same command, it goes and downloads it anyway.

But I have make etc in /Applications/Xcode.app/Contents/Developer/usr/bin so a work-around looks like putting that before /usr/bin and it seems to work.... to a point... until /usr/bin/make is invoked, when it of course cacks again. And I can't move /usr/bin/make aside or make it a symlink, even as root.

Very annoying!

  • OK, turns out all I had to do was open the XCode app, and enter my password, then the command-line tools worked.

Add a Comment