I\'m trying to use Swift 2\'s new @testable declaration to expose my classes to the test target. However I\'m getting this compiler error:
This is probably because your main target Enable Testability is set to NO. You should set it to YES in the debug scheme (which is used for running your tests).
If you use Carthage, this problem can be caused by importing frameworks with @testable, because they are built with a release scheme.
Most of the times it's bad practice to import frameworks with that prefix, so you could avoid it.
If you can't, you should Enable Testability in the frameworks' release scheme. https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW326