I have an Xcode project which was downloaded from the internet so I don\'t know which Xcode version was used to write it but the language is Swift 2. I opened it in Xcode 7.
I had the same problem recently with Xcode 11.4 on Catalina 10.15.4.
Rebooting, cleaning project folders, or deleting the derived data directory did not help. What solved the problem for me was to remove and reinstall Xcode (I use the AppStore version).
It is possible, that I caused the problem myself by reinstalling macOS 10.15.4 via a Combo-Update.
The above answers are correct. I have a bit similar approach.
After, I use these steps:
Clean the project.
Remove your Assets from your project(Remove References). Run the project without assets. Now the project will show some compile errors, these are not very tricky.
Run the project, this time project run without your assets and may be chances of crash. This ensures that project will run.
Now clean the project and add the assets, now run the project. The project runs successfully.
For me it works. I hope it will be helpful to you.
So After Trying a bit i removed the XCassets file form the Copy Bundle Resources, build once without it and then added it again. Solved it for me.
I tried everything . But nothing worked . So i reinstalled Xcode . I took some time . But worked
I was also facing the same issue tried cleaning and restarting XCODE didn't worked for me,
so I removed xcassets and added the image sets again one by one, and that worked for me.
I had to restart my machine to get this to work. Just in case, here are the exact steps I did: