I updated to xcode 10 from Xcode 9.4 and then when trying to run my UI tests nothing seems to be working. The test app loads for a while then test failed although the build is successfully done before the tests. and the source code builds successfully as well and I can run the app on the simulator.
The error is:
Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying error: The test runner failed to load the test bundle. Executable cannot be loaded for some other reason, such as a problem with a library it depends on or a code signature/entitlements mismatch.))
First, if you are using Cocoapods make sure your test target has the inherited search paths set up, something like that for instance :
# MARK: Common pods
abstract_target 'AppCommon' do
pod 'Alamofire'
target 'MyFrameworkA' do
project './MyPath/MyFrameworkA/MyFrameworkA.xcodeproj'
target 'MyFrameworkATests' do
inherit! :search_paths
end
end
end
Next, in your Build phases of your FrameworkA, make sure that any other frameworks (B, C used in A), are set up as target dependencies AND added to the Linked Binary With Libraries.
Finally, make sure your FrameworkATests target have your FrameworkA in Target Dependencies and is added in the Linked Binary With Libraries phase too.
Xcode 10 introduced new build system which parallelise the most of the building talks including the dependencies. The new build system can detect most of the configuration issues. Must of the projects which has unusual configuration started to fail and new build system has detected this. All things that you should know about build system https://www.xcteq.co.uk/xcblog/five-things-you-must-know-about-xcode-10-new-build-system/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With