I'm having trouble creating an archive of my development build for internal testing. When archiving, it encounters errors such as:
error: cannot find 'MockDataModel' in scope
This type is used within a PreviewProvider
, and the file containing this type is included in the "Preview Content" folder, which is listed in the "Development Assets" of the project settings.
As expected, the "Preview Content" directory is properly excluded from the archive, but what is not expected is that the PreviewProvider
where it is referenced is included while compiling. This post indicates that it is dead code and will be stripped out when archiving.
I'm hoping to get a better understanding of which build setting(s) or other mechanism determine when PreviewProvider
s are excluded from a build.
Cheers!