'No Assistant Results

I am having an issue where the code associated with some of my View Controllers is not showing up in the Assistant Editor window to the right of the Storyboard. It says "No Assistant Results" where the swift code should be.

Things I have tried (There are many things):

  • Cleaning project
  • Deleting DerivedData
  • Creating new, identical View Controllers to see if the issue was just in those particular views.(the same issue occurred)
  • Deleting and Reinstalling Xcode
  • Restarting my Computer.

NOTE: I also am getting a warning at the top of the editor: Internal Error has occurred, source Editor functionality is limited.

enter image description here



Solution 1:[1]

Ok, I've had this problem before. I couldn't remember how I solved this so I searched on Google and found this question. But this time, nothing helped me. These are the things I did. I believe the last one solved this.

  1. Clear Derived Data. Go to Terminal and enter this: rm -rf ~/Library/Developer/Xcode/DerivedData
  2. Quit the whole Xcode.
  3. Close all tabs of Xcode and make sure to view some class files instead of Interface builder and go try again viewing assistant results.
  4. Remove the assigned class to the View Controller nib you think causes the problem, then assign the class again. Boom! Solved!

Solution 2:[2]

This method worked for me: (Xcode 10.2)

1- Select the broken ViewController on the StoryBoard

2- In Identity Inspector, change the item in Class to another class (any class)

3- Change the Class back to related class

4- Save and close the project

5- Reopen the project

Solution 3:[3]

What worked for me was to close Xcode entirely, open again, and then I tried assistant.

Solution 4:[4]

Just do a simple close the app and open the app again. It worked for me

Solution 5:[5]

Deleting derived data did not work for my problem. This is how I solved this when I encountered this issue,

Go to the file that contains your class, go to File inspector > Target Membership, and then make sure that there is a check mark in the target of your project.

File inspector

I hope this solves your issue.

Solution 6:[6]

Click option+alt and click on the view controller you want to present.

Solution 7:[7]

Go to Assistant Mode on the upper right.

Click Command + Shift + T. New window will be opened and close the old one. You will be able to see something. Now go to Top Level Objects and select your file.

Solution 8:[8]

Argh! This annoyance happens to me all the time.

I'm not 100% sure I know what the fix is, however I think I may have just "fixed" this a few seconds ago using the following voodoo:

1) Delete derived Data

2) Close xcode, reopen Xcode. Maybe Wait for indexing to finish?

3) View a source code file (.m,.h, .swift) in the main editor, the assistant editor should now show "Counterparts".

4) Change this to "Manual" rather than "Automatic"

5) Switch back to your nib/storyboard

6) Change back to "Automatic" rather than "Manual"

7) Probably continue pulling hair out :)

Edit

Seems as though maybe only step 3 is required as this happened again just now.

Solution 9:[9]

I had this issue and was able to resolve it. I resolved it by viewing the storyboard as source. I then removed everything in and including the tags (Saving it to restore later). I then went back and viewed the storyboard normally and created a new ViewController. Once the new ViewController was on the storyboard the assistant editor acted as normal. I then went back and viewed the storyboard as source code once again and replaced the current tags with the one I removed previously. This resolved my issues hopefully it will help for you.

Solution 10:[10]

The same problem happened to me. I only have to restart Xcode (12.2)

Solution 11:[11]

For any one who is encountering the same problem in Xcode version 13.3

Explanation: for me, the reason why it wasn't working is that I created a controller, view, and model Folder and I put the Main.storyboard inside the view folder and the viewController.swift inside the controller view, therefore when I try to access the assistant Result Xcode doesn't know where the viewController file is, so he is not able to connect between the storyboard file and the latter.

Solution: What worked for me is that I simply ran the app and it automatically connected the viewController with the storyboard.

I hope this was helpful.

Solution 12:[12]

I don't know if this is still helpful or not, for what is worth, the way I managed to restore this when it's been working perfectly and all of a sudden it stopped is by changing Assistant Editor view-mode.

I usually have it in Assistant Editors at bottom, so just change it to whatever else, such as All Editors Stacked Vertically and go back, and it should be working ok now.

xcode 8.3.2, if it's any use.

Solution 13:[13]

xcode screenshot of the location

I tried various ideas mentioned here but nothing worked for me. So in the Project navigator, I right clicked on the .DS_Store file, clicked on Delete, and then chose "Move to Trash" on the confirmation prompt. After closing Xcode and opening it again, a new .DS_Store file was created. The Assistant Editor is working again and the .h and .m files appear in the Project navigator again. I am using Visual Studio for Mac which communicates with Xcode. Today I had to close and open both Visual Studio and Xcode after deleting the .DS_Store file.

Solution 14:[14]

For me (Xcode 11) it was cause by installing cocoapods, tried all the trick that I could find. Finally this helped me. Go to Xcode File Menu -> WorkSpace Settings -> enable legacy build systems enter image description here

Solution 15:[15]

you may have changed the name of the .swift file after you connected your IB oulets and IB actions.

select main.storyboard and select your view controller. at the far right select identity inspector. check if the class name is the same name as your .swift file, if it is not you need to put in the file name and the assistant should show up now.

Solution 16:[16]

In my case, the class name of File's Owner is incorrect (the class doesn't exist). I corrected the class name and it works again

Solution 17:[17]

Identity Inspector

Go to the view controller Identity Inspector (see the image). Change your controller to something incorrect, then change it back.

Solution 18:[18]

I had the same problem and I realized that selecting the Outlets option in the top of the Assistant Editor View solves the problem.

In addition to this, I found that if your classes are in several groups for some reason Xcode losses the reference to the class.

enter image description here

Solution 19:[19]

I setup the folder for the derived data when I installed Xcode in a folder I deleted cleaning my disk! So I created a new folder and I assigned in locations as above. Thats it! I was cleaning a file that didn't exist.in the Xcode->preferences->locations

Solution 20:[20]

If the problem started after renaming the ViewController, first check whether you've changed the class name inside the ViewController file as well.

enter image description here

Solution 21:[21]

I have disabled xcode indexing, so after enabling indexing it starts working

Solution 22:[22]

Faced same issue. For me it happen when I moved my view controllers to the new group. The solution was unfortunate, but at least it worked again - I just moved the files back to the origin folder.

Solution 23:[23]

In Xcode 12.x, this will happen if you rename your ViewController file after creating it. If this is the case, just simply delete that ViewController file, and create a new one with a file name that you will not change, and then the Assistant window should automatically populate.

Solution 24:[24]

Please make sure that there is

no error in your project and your project is complining succesfully.

In my case, there was an error om some other class due to which I was not able to see assistant results.

Solution 25:[25]

After 7 imaginary hours, I finally found the answer. this is only for the storyboard for other people out there reading this is the answer if it does not help I don't care but here it is.

(This is an example project I cloned from GitHub)

Just select veiwcontroller.swift in the document outline, it should work.

Here is a screenshot.

Like i told, example project.

Solution 26:[26]

Had the same problem on Xcode Version 13.0 (13A233). As Glenn Posadas mentioned, deleting the derived data rm -rf ~/Library/Developer/Xcode/DerivedData then closing and re-opening the project solved the problem for me.

Solution 27:[27]

I had the same problem, so I re-organized files in folders and it got fixed. If you have the file in a specific folder, please put it outside that folder.

Solution 28:[28]

Try this (XCode 13.2.1):

  1. In Storyboard, select the object whose class definition you want to bring up in the assistant editor.
  2. Delete the custom class in the Identity Inspector, being sure to press the return key to lock in the change.
  3. Quit XCode and reopen.
  4. Re-enter your custom class name in the Identity Inspector.

I tried all the suggestions above and this was the only thing that worked for me.

Solution 29:[29]

There must be a bug in Xcode. I am learning how to use it and have noticed a few bugs. In order to fix this:

  1. Click the View Controller you are having issues with.

  2. Click on the ID card (The Identity Inspector) in the inspector pane.

  3. Under Custom Class, next to class, type in the class you want to connect it too.

  4. Then save your project and close it out.

  5. Reopen your project.

The assistant editor should pop up and be working. This happens every time I click it and click out of it. It's quite annoying.

Solution 30:[30]

Xcode 13.3.1

None of these worked but I did a clean and shut everything down and reopened and it worked.