We use our own internal binary frameworks within our company. We have access to the Xcode projects and we build binaries with our CI system. Previously we needed to recompile all our frameworks for each new Xcode release, minor and major. When we updated to Swift 5.1 with module stability our frameworks could work with future versions of Xcode without recompilation.
However we found a limitation in module stability which we were unable to solve. If we import one of the frameworks with @testable, and this frameworks was built with different version of Xcode, our main project fails to compile a test target. This issue preventing us upgrading to Xcode 12 easily.
While our long term goal is to use SPM, we not fully adopted it yet. I was wondering is there any solution for this problem.
We compile our frameworks with following 2 settings for all targets (main and test):
However we found a limitation in module stability which we were unable to solve. If we import one of the frameworks with @testable, and this frameworks was built with different version of Xcode, our main project fails to compile a test target. This issue preventing us upgrading to Xcode 12 easily.
Xcode 12 suggests to Remove '@testable' to fix this issue, however because it's just a test target we would like to avoid modifying main source target just for purpose of unit testing.Module "FrameworkName" was not compiled for testing
While our long term goal is to use SPM, we not fully adopted it yet. I was wondering is there any solution for this problem.
We compile our frameworks with following 2 settings for all targets (main and test):
BUILD_LIBRARY_FOR_DISTRBUTION set to YES
SKIP_INSTALL set to NO