Swift: Resolving “No Assistant Results” in Xcode 12 — Check This FIRST!

So you’ve laid out your storyboard, imported your assets, completed some initial coding work, and now you’re ready to start creating outlets. There’s only one problem — you’re getting “No Assistant Results” when you open up the Assistant Editor!

In my previous post, I laid out the frustrations with Swift, and particularly, the changes in Xcode that can lead you down hair-pulling dead ends when you search Google for possible solutions. I will list the other solutions below, but check this first!

  1. Start by opening your view controller that should be linked to your storyboard and look for the class name. If you’re used to using a prior version of Xcode and attempted to organize and rename this class, you’ll notice that Rename is no longer a main contextual menu item:
Rename is no longer in the main contextual menu. Instead, look under Refactor!

2. Instead, it’s now been reassigned to the Refactor menu:

There you are! BUT, if for some reason this fails, keep the next steps in mind!

Note: By using this menu, it should deploy your name changes across the project. I’ve noticed this process to be flakey — still unsure if it’s me, the beta, or the Ghost of Coders Past?

3. Regardless, make note of your class name, in this case above, it’s “MainVC”

Your class name will come in handy later — make note of any changes here.

4. Head over to the storyboard that should be connected to the class, and select the View Controller in the Document Outline. This is where you’ve been seeing that dreaded “No Assistant Results”!

5. Open the Identity Inspector and identify what Class is currently selected:

6. Check the drop-down, and select the class name that you identified in Step

7. Success! You’ve now linked (or re-linked!) this view controller with the storyboard:

Alternate Solutions

The basic concept of Occam’s Razor is that the simplest explanation is usually the correct one. Yet, if you’ve run into this problem, you likely didn’t see this solution at the top of any discussion forums. Here are some of the solutions presented elsewhere, just in case the above solution doesn’t work for you:

By Michael Teper and zedtse:

You can try deleting the project’s Derive Data.

Close the project. Note: do not quit the XCode.

Window->Organizer (or, Window->Projects, depending on your version of Xcode)

Find the project.

Delete the Derived data using the “Delete…” button.

Additionally, if your Xcode is running incredibly slow, you may have an indexing issue causing the problem. Toggling Xcode indexing, given by Josiah, may solve your issue:

Just run this command in the terminal to turn off Indexing:

defaults write com.apple.dt.XCode IDEIndexDisable 1

To turn it back on, run this:

defaults write com.apple.dt.XCode IDEIndexDisable 0

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store