Last active
April 14, 2020 13:35
-
-
Save liamnichols/3507faf70ecca201cb4300645caa9b74 to your computer and use it in GitHub Desktop.
Fix for missing libswiftXCTest.dylib when trying to run Unit Tests in Xcode 11.1 on an iOS 11 simulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 11.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift | |
sudo ln -s /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 11.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/Swift/libswiftXCTest.dylib /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 11.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This cocoapods "fix" doesn't really help because it means you have to modify the framework's .xcodeproj and then rebuild the framework. If that framework is a third-party dependency that you're including via CocoaPods or Carthage, then actually the kind of solution you're suggesting is a much better idea.
But one thing sticks out from Apple's suggested fix mentioned on that thread: they are saying that
libswiftXCTest.dylib
is obsolete and has been replaced bylibXCTestSwiftSupport.dylib
, which "should" have all the same symbols in it. So, if you want to use this newer .dylib, then you would want to set up your symlinks like this:Personally I think this is due to a bug in XCode... it should be able to find that .dylib. But Apple has created a literal hell of duplicated directory trees throughout their development apps like XCode and Simulator. It's gotten so out of control that it's no wonder this kind of problem is happening.