Mus Harlem
Mus Harlem

Reputation: 175

Xcode assistant editor won't show some of the code

First of all, I would like you to know that the class IS set to the correct file in each ViewController - I know that because it did work before, but then I got a "crash" in Xcode that blinked quickly without me being able to read it before it went off again.

MY PROBLEM IS:

I have a lot of ViewControllers in my Xcode, everything was working fine, I was making some more features to the ViewControllers.

Then I got the "crash" as mentioned above, and it would not show any of the files/classes related to their ViewController in assistant editor.

Assistant editor just said: No Assistant Results. Then I read that I could just show the files inside my XCode project and delete project.xcworkplace and xcuserdata. And I thought it worked at first, but it did not work on every viewcontroller unfortunately - only on some of them.

Now, I still have plenty of ViewControllers left to edit that aren't working, and I would hate if I had to recreate every single one.

Does anyone have a better solution to this? I really hope you do :-)

Upvotes: 2

Views: 3996

Answers (5)

Dee Ker
Dee Ker

Reputation: 1

I cloned a project and found that I have the same problem. But all I did to fix it was to just sign the app at Signing and Capabilities and the option for the right View Controller pops up in the top bar of the Assisntant in my View

Upvotes: 0

Deepak Tagadiya
Deepak Tagadiya

Reputation: 2245

xcode 9.0

  1. Open project.
  2. Click on "Show the assistant editor".(top right side middle button - circle shape)
  3. Code was show after do second step.

Upvotes: 0

user4806509
user4806509

Reputation: 3011

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

Upvotes: 0

Nurdin
Nurdin

Reputation: 23891

Make sure you set Automatic not Manual.

enter image description here

Upvotes: 4

qwerty_so
qwerty_so

Reputation: 36333

There was some related answer but I can't find it. Anyhow: what I do to fix it is to uncheck the Target Membership in the File Inspector for the XIB and then turn it on again. That fixes the issue (in most cases) for me.

Also try restarting/clearing the different caches of XCode.

Upvotes: 4

Related Questions