Test target X encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
I have my notes and demo applications for both Cocoapods and Carthage here https://github.com/onmyway133/TestTarget
- Make sure all frameworks are linked to the Test targets
- Configure
Runpath Search Paths
to point to$(FRAMEWORK_SEARCH_PATHS)
More info
- Run-Path Dependent Libraries
XCTests canceling prematurely
Problem resolved in comments. For future readers, here are some good things to check if you encounter similar issues:
- Check Xcode messages tab to look for build errors.
- Restart device/simulator as appropriate. This fixed the problem in this case.
- Uninstall/reinstall app on device/simulator.
- Are certs/provisioning profiles valid? Try generating new ones and re-running.
- Does it work on the simulator? If yes, this is likely an issue with the device itself.
- Are breakpoints hit when you run the code? If yes, then this is a test failure. If no, the problem is happening before the tests are even run (as was the case here).
Xcode 9.4 : Error generating code coverage
Is is possible you are running on device and it is locked?
The same thing just happened for me ("Error Generating Code Coverage" when trying to run all tests) and then I realized that Xcode was trying to build to my phone, which was locked. It ran ok on my phone after I unlocked it (and fine on the simulator as well).
Xcode 9.4 : Error generating code coverage
Is is possible you are running on device and it is locked?
The same thing just happened for me ("Error Generating Code Coverage" when trying to run all tests) and then I realized that Xcode was trying to build to my phone, which was locked. It ran ok on my phone after I unlocked it (and fine on the simulator as well).
Related Topics
Convert String to Cgfloat in Swift
How to Update Swift Dependencies in Xcode
Swiftui: Detect Finger Position on MAC Trackpad
Seeking an "Exit" Equivalent in Swift
Add Placeholder to Uitextfield, How to Set the Placeholder Text Programmatically in Swift
Duplicating a Particle Emitter Effect in Sprite Kit
Swift Remove Object from Realm
How Get Rootviewcontroller with iPados Multi Window (Scenedelegate)
"Missing Required Entitlement" for Nfctagreadersession
Check Availability in Switch Statement
Pop to Root View Using Tab Bar in Swiftui
Swiftui MACos Nswindow Instance
Using Environmentobject in Watchos
How to Save Cgimage to Data in Swift
Swiftui: How to Draw Filled and Stroked Shape
Why Does My Pfanalytics Not Have Trackappopenewithlaunchoptions Function? (iOS Swift)