For unit testing public classes for my main application goal in my quick unit tests, I have to import my main application module into my tests as follows:
#import MyAppModuleName
This worked fine until I changed the deployment target from 7.0 to 8.4.
Now creating and running my application still works fine, but the unit tests that have run have stopped working. The compiler complains about the above import statement: Swift Compiler Error: Module file minimum deployment target is iOS8.4 v8.4
I do not know why. I forgot to change the deployment target somewhere else?
My workspace (Xcode 6.4.) Contains my own project and the Pods project (auto-generated cocoapods). I use Swift and Objective-C in my application and in my tests.
Here is what I did in more detail:
1) The deployment target has been changed from 7.0 to 8.4 for my project, my main goal, and also for the Pods project in my workspace and all targets.




2) Cleared the build folder (Shift + Alt + Cmd + K) and restarted Xcode.
3) Cmd + U → Error
If you change the main goal of deploying the application to 7.0, everything works fine again.
Any ideas this issue comes from?
ios unit-testing xcode swift build-settings
Goodsquirrel
source share