The problem cropped up again, and I bit the bullet. In Xcode, I created a new project and copied all the source from the old to the new project. I recreated everything in the new project, meaning: set the bundle ID, version number, build number, launch screen et cetera.
That fixed it. So, it's not the source files themselves, it's something in the project file(s). I did a manual diff between the <projectname>.xcodeproj/project.pbxproj of the old and the new project, but I gave up after staring 15 minutes at the incredibly messy diff. Preview now work.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: