This copy of libswiftCore.dylib requires an OS version prior to 10.14.4. on swift test command

After recently upgrading to macOS 10.15.6 (19G73) I got the following error trying to run tests on swift package, both from terminal and Xcode.

This copy of libswiftCore.dylib requires an OS version prior to 10.14.4.
Exited with signal code 6

I'm running Xcode Version 11.6 (11E708) and Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53), Target: x86_64-apple-darwin19.6.0.

The issue seems to affect both real projects and freshly created ones. Init and build run fine, test always give me the same error.

Running unit tests for an iOS project works without any issue.

Do you have Developer Tools installed? Do you have older Xcode's installed? Xcode betas? Does xcode-select -p print out the development environment you expect?

You're are right, I forgot to give this detail. Anyway it seems correct to me:

➜  ~ xcode-select -p
/Applications/Xcode_11.6.app/Contents/Developer

Even changing to a different version (e.g. Xcode 11.5) doesn't seem to fix the problem. I also tried to run a reset with the following command:

xcode-select --reset

And setting back the correct Xcode version but still no results.

Funny thing, I just tried to install the latest Xcode 12 Beta 3 and everything works flawlessly.

➜  SwiftTest xcode-select -p
/Applications/Xcode_12_beta_3.app/Contents/Developer

Both from CLI:

➜  SwiftTest swift test
Test Suite 'All tests' started at 2020-07-23 11:45:44.948
Test Suite 'SwiftTestPackageTests.xctest' started at 2020-07-23 11:45:44.949
Test Suite 'SwiftTestTests' started at 2020-07-23 11:45:44.949
Test Case '-[SwiftTestTests.SwiftTestTests testExample]' started.
Test Case '-[SwiftTestTests.SwiftTestTests testExample]' passed (0.068 seconds).
Test Suite 'SwiftTestTests' passed at 2020-07-23 11:45:45.017.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.068 (0.068) seconds
Test Suite 'SwiftTestPackageTests.xctest' passed at 2020-07-23 11:45:45.017.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.068 (0.068) seconds
Test Suite 'All tests' passed at 2020-07-23 11:45:45.017.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.068 (0.069) seconds

And from Xcode:

When I switch back to Xcode 11.6 I get again the error. Well at least I found a workaround :sweat_smile: but it seems a really strange behavior :thinking:..

Terms of Service

Privacy Policy

Cookie Policy