I started having peculiar problems when using XCode. Whenever I try to write test with swift, XCode shows an internal error and all the code turns white.
This happens even if I remove the @testable
annotation from the code.
I tried reinstalling XCode, but this did not help. The code builds just fine so I don't have a clue where the problem might lie.
I'm unable to properly develop tests this way, my modules are not recognised, I have no error checking or code completion.
Here is a screenshot of how the problem looks:
Would love to get any guidance on this issue...
So I guess for now there is no good solution to this problem. It seems to be caused by crashes of SourceKit.
Fortunately the problem is not solved (partially) on my end.
I decided to make this answer a compilation of different things to try when experiencing this:
rm -Rf ~/Library/Developer/Xcode/DerivedData/
, but you can also delete it from Xcode rm -Rf ~/Library/Caches/com.apple.dt.Xcode
- Currently this seems to help the most I will edit and add more solutions if I find any
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.