I had the same issue. I tried a lot of troubleshooting solutions like:
Cleaning the Build folder;
Restarting Xcode;
Reinstalling Xcode (!);
Deleting contents of Xcode's Derived Data folder.
Nothing worked 😕 But I believe I found the solution! ☺️
Here's the fix that worked for me: Simply delete Xcode cached data.
To delete Xcode cached data:
Close Xcode;
Open System Preferences on you Mac;
Go to General tab and select Storage section;
Locate Developer section (the system might take few moments to calculate the size of the files on the drive);
Press on 'i' icon next to Developer section;
Under Xcode Project Build Files locate cache list item (I already deleted it, so I don't remember the original name 😋 )
Delete the cache and wait for the deletion process to complete;
Open Xcode. The error should disappear and everything should work as expected.
This worked for me. Hope this helps!
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: