So, I am trying to learn swift and writing code since about 3 months now. It seems that all of a sudden Xcode won't show the code for the selected UIViewController in the storyboard in the assistant editor. This happens very often. I clean the project - no help. I reset content and settings of the simulator - no help. I create new user on the computer and load up my project there and it works great... For a while. Then we are back to square one. Either I am doing something really weird and messing things up, or the Xcode is doing something really weird and messing me up.
Any quick fixes for this?
You can try deleting the project's Derive Data.
The above didn't work for my case. I was similarly not able to view code/classes relating to the View Controller. In my particular case, it appears I might have caused the issue- I turned OFF Indexing because Xcode was running terribly slow and around that time I started getting the issue and the message “No assistant results”.
To resolve this in my case, I turned indexing back ON and set the Assistant editor to “Automatic”.
To turn Indexing On or Off, open up the Terminal using either of the below commands-
Turn Indexing OFF: defaults write com.apple.dt.XCode IDEIndexDisable 1
Turn Indexing ON : defaults write com.apple.dt.XCode IDEIndexDisable 0
From accepted answer regarding Indexing: Stopping xcode from indexing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With