In my SwiftUI app, I have put some sample model objects in Xcode's "Preview Content" folder. I only access them in my SwiftUI PreviewProviders. My understanding is that the code/assets in this folder are only used for previewing in the Canvas. My previews work properly. I'm using Xcode 11.6 (11E708).
However, when I go to Archive my app, it fails because it cannot find these sample model objects. I was under the impression that PreviewProvider code is not build into the final binary as of Xcode 11. See this question and this screenshot from the Xcode 11 release notes.
(Curiously, I am able to compile with the Release configuration. It's just Archive that fails.)
As a workaround, I can put the #if DEBUG/#endif wrappers around my PreviewProvider but the above screenshot indicates that shouldn't be necessary.
Do I misunderstand how the "Preview Content" folder works?