I\'ve installed Xcode 10 and upgraded my iOS application to Swift 4.2. When I run my tests (both UI and Unit) via Xcode, on an iPhone simulator running iOS 12, the tests success
In the Project Navigator, select the project file. Select the Target in the Project configuration window. Select Build Settings tab, (Basic and Levels) Scroll down to iOS Deployment Target and then select the desired OS version.
That solved the problem for me. cheers rgds Dave
The test targets had the iOS Deployment Target
setting left as the default value.
In Xcode 9.4, this is equal to "iOS 11.4", yet the tests can still be run on an "iPhone 7 (10.3)" simulator for some reason. In Xcode 10, there seems to be a change in behaviour since the tests no longer run on simulators running iOS versions prior to the default "iOS 12".