Module file's minimum deployment target is ios9.2 v9.2
After I changed the iOS deployment target to 8.0 for my PROJECT. The project is created by Xcode 7.2, with 'Include Unit Tests' and 'Include UI Tests' checked.
Because of the XCUIApplication() requires iOS 9.0+, to fix the error, just change the deployment target of UI Tests to 9.0 or above, and leaves 8.0 for other targets.
I had this problem when the minimum deployment target of a select few dependencies was set to a more recent iOS version than main targets minimum deployment target.
I had the same issue when i downloaded a framework tutorial with ios 12 & my sdk has to have ios 11.4.
I set the iOS Deployment Target to the version I needed(11.4) and updated the Pods dependancies also. But missed a few.
So, then I did a search with the version that i wanted to change (that is 12.0). It just lists everything that has the version number (target, project, podspec, pods). Changing everyone of those (to 11.4 in my case), solved it.