The problem for me was a couple of PNG files that had the wrong extension (.jpg). I used file <filename> to check which ones I needed to fix.
Post
Replies
Boosts
Views
Activity
Having the same issue, I think. Not really sure what I can do about it. Did you happen to figure something out?
My team ran into the same problem. We fixed the issue by removing the Swift file from Developer Assets. Our understanding is that the preview mocks will be stripped since they are only used in the PreviewProvider types that are also stripped. I haven't run the validation suggested in the post you linked, though.
This article was helpful to my understanding:
To be clear; we’re not adding these Swift files as Development Assets as we did before with our preview assets catalog. The reason is that the compiler would fail during archiving as the code we referenced is no longer present. You could solve this using #if DEBUG checks, but that’s not always nice to use. Instead, relying on dead code stripping makes much more sense.
https://www.avanderlee.com/xcode/development-assets-preview-catalog/