I have a Swift project including a test target, on GitHub: https://github.com/mshibanami/GitHubTrendingRSS
When I ran
swift test for that, then I got errors like this:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:10: error: could not build module 'Dispatch'
This is the actual log: https://github.com/mshibanami/GitHubTrendingRSS/runs/431904961?check_suite_focus=true
However, this never happens on Xcode with generated xcodeproj by
swift package generate-xcodeproj.
Also, when I went through these steps, then
swift test tests all cases precisely:
- Remove the dependencies from
swift testand get
ld: symbol(s) not found for architecture x86_64error
- Restore the removed dependencies
But since the errors are raised again when I ran
swift clean, it doesn't completely resolve this problem.
What is the problem and how can I fix this?