I was getting this on command line builds using xcodebuild. Specifying a different DerivedData folder fixed it.
Chirag's thread on Stack Overflow mentions this solution: https://stackoverflow.com/questions/79118572/xcode-16-and-ios-18-project-not-compiling
Post
Replies
Boosts
Views
Activity
This is still happening with the Xcode 13 RC.
Same problem here, following.