Today when I tried to create a new project I quickly noticed that I got an error:
"an internal error occurred. source editor functionality is limited. attempting to restore"
Which is weird, a project that was created literally 5 seconds ago shouldn't have any errors, right?
So I closed it and opened an older project, no errors there.
Next I deleted the new project and recreated it. Still the same error.
I cleaned derived data, restarted Xcode, restarted my mac, even went as far as completely uninstalling Xcode and then reinstalling it, but I still get the same error.
Not only does that error stop me from using auto-completion and other nice editor features, but also from creating outlets for my views
Hopefully someone here has an idea how to fix this.
your reply got me thinking, so far I always named the project the same, so I tried naming it different.
I'm currently following the "Hacking with Swift" series and I'm naming the projects after the chapters/things that I learn in them.
In this case it was "CoreGraphics"
So I deleted the project, created a new one simply name "TestProject". Sure enough it worked.
Then I deleted that one, created a project named "CoreGraphics" again and with the name the same error appeared again.
I tried this a few more times just to be sure and everytime the name of the project was "CoreGraphics" the error would appear, but not with different names
Names such as "TestCoreGraphics" or "LearningAboutCoreGraphics" work just fine.
Not sure why it is just CoreGraphics because I previously named projects after other chapters (e.g. "GrandCentralDispatch" and "UserDefaults")
I guess it's probably bad practice to name my projects in such a way, but my thought process here was to have a "Learning" folder and have the projects as self-explanatory as possible so I could quickly revisit a topic if I wanted to