A few days ago I updated the packages in my swift project to newer versions. I am using the Firebase SDK as well as a few others. Immediately after updating, I got a "Missing package product ‘GoogleUtilities_UserDefaults’" error.
After researching this issue, I have attempted:
‘File’ -> ‘Packages’ -> ‘Reset package Caches’
‘File’ -> ‘Packages’ -> ‘Resolve package Versions’
‘File’ -> ‘Packages’ -> ‘Update to latest Package versions’
With no effect.
As suggested by another Stack Overflow answer, I updated specifically to Firebase SDK Version 10.22.1, no luck.
Now I am on SDK version 10.27 (Latest version), same error.
I restarted my Mac (A suggestion on the Apple dev forum), nothing.
Clicking the error message in Xcode just points back to the root project file, and the logs do not provide any clues as to what is referencing this in the project. I assume its the firebase SDK as that is the only Google component in the code. I poked through the github repo for SDK looking for file names or anything related to User defaults and came up empty.
Xcode version 15.3
Any suggestions on where to go next? Thanks!
2
Answers
Deleting and reimporting the package worked! now on to the next issue... Thanks everyone for the help!
I was having this issue as well, cleaning the build fixed it for me ‘Product’ -> ‘Clean Build Folder’. I found the answer here(latest reply): https://forums.swift.org/t/missing-package-product-error-for-all-local-swift-packages-when-switching-git-branches/38041/51