StoryBoard Assistant Editor stopped showing associated file

IosObjective CXcodeXcode Storyboard

Ios Problem Overview


Xcode storyboard assistant editor stopped showing related files. "Automatic" is selected and "Class" is filled in Identity Inspector.

It was working before, but know it has stopped. "Auto" or "CounterPart" modes are still woking for other files except StoryBoard.

A few days ago, I tried to update from Xcode 5 to 6, but later on gave up. Would that have something to do with it?

Ios Solutions


Solution 1 - Ios

Found the solution (at least worked for me), it's the same bug that causes you not to be able to create new outlets. You must delete the [DerivedData] folder:

  1. Close the project you are working on with.
  2. Delete the【DerivedData】folder of you project. (This folder may inside your project's folder, or inside ~/Library/Developer/XCode/DerivedData/(your project)/ ) or somewhere else that were setup by you.
  3. Restart Xcode.

see here.

Solution 2 - Ios

With XCode 11 onwards, you can option(alt) + click on the file that you want to view in assistant editor. Simple Fix.

Solution 3 - Ios

In same case this worked for me:

  1. Right click on ViewController file(on left pane) and choose Delete -> Remove Reference.
  2. Right click on folder where this ViewController file was and choose Add files to .. and add this ViewController file which your just deleted.
  3. Profit.

Solution 4 - Ios

Deleting the Derived Data didn't work for me nor force quitting Xcode and restarting it.

The only thing that worked was deleting both the class and the storyboard (only the reference to them) and adding them back to the project.

Hope to help someone.

Solution 5 - Ios

Maybe it's too late but just with the keyboard, you can launch a reset for associated files. Use the keyboard : command + option + shift + z

You can find it in the menu Xcode->View->Assistant Editor->Reset Editor.

Solution 6 - Ios

> If anyone is wondering how to find Assistant editor in XCode 11 then > please find the steps from the below image. You can show this options > in storyboard or Xib files on upper left corner.

enter image description here

Solution 7 - Ios

Click first on the assistant window, then click on 'option'+'alt' and right click on the view controller that you want.

Solution 8 - Ios

I have Xcode 13.1 and none of these solutions is working for me, but this simple solution works for me every single time. With your Storyboard and (empty) Assistant Editor open, in the upper right of the Editor window click the "Add Editor on Right" icon Editor On Right Icon, and just as promised, it will open a new editor to the right of your Storyboard and (broken) Assistant Editor, only the Assistant in THIS window will be working! Just find the "Close Window" x on your broken editor, close it, and in its place will be your shiny new working Assistant!

Full Editor View of where to click to open the new Editor On Right

Solution 9 - Ios

This command on terminal fixed my issue:

    defaults write com.apple.dt.XCode IDEIndexDisable 0

Solution 10 - Ios

For Xcode 8+ versions

Check at top process indicator that if Xcode is "indexing" files... if yes, then, please wait until it finishes. Once it get finished. Your file will automatically appear as counterpart in Automatic section.

If Xcode is not showing "indexing" in process bar, then perform as @Anna Chiara's Answer

Solution 11 - Ios

  • I deleted ~/Library/Developer/XCode/DerivedData -> didn't work
  • Xcode->View->Assistant Editor->Reset Editor is disable

Finally, I figured out that the class name of File's Owner of .xib file is incorrect (the class doesn't exist). I corrected it and Assistant Editor works again.

Hope this helps you

Solution 12 - Ios

I had the same problem. Finally this is what worked for me.

  1. Changing the name of the ViewController File.
  2. Change the name of the class to the new name via the Refactor tool

Refactor tool

Solution 13 - Ios

The only thing that ended up working for me was copying over the code from the offending ViewController files and completely deleting them, then creating new ones with the exact same name and pasting in the previous code.

The assistant then linked up to the new ViewController files with no issue.

Solution 14 - Ios

simply exiting and reopening Xcode worked for me.

Solution 15 - Ios

None of these answers worked for me w/ XCode 13. However, the following worked:

  1. Rename the ViewController class to ViewController2

  2. Update the reference in the storyboard to ViewController2

    This made the assistant editor appear.

  3. Change the name of the class back to ViewController. Change the reference in main.storyboard back to ViewController and hit enter (Step 2)

Solution 16 - Ios

I had same issue and spent almost 2 hours of trying different aproaches finally I found something to solve problem.

I've created two or more VC at the same swift file and I think that's why IDE confused about the files. So I suggest that you should delete your viewcontroller class and clean than reassign class.

I hope it works for you too.

Solution 17 - Ios

For what it is worth, this was happening to me for the last couple days on 9.3 . I had just added a new build schema for an alternate debug symbol on testflight. It was not until I removed the new schema and then deleted Derived Data and restarted did it start working again. I have re-added the new schema back in and it continues to work. Not sure what the issue was, but that is what solved it for me.

Solution 18 - Ios

In case anyone is watching I had a bizarre instance of this (Xcode 11): I deleted a View Controller that I'd done incorrectly; dropped in a new one, created the UIView and associated. BUT I didn't bother to create the outlet from the View Controller on the previous screen. Strange that it let me work for a few minutes, then after I had turned off the assistant editor to do something else, turned it back on and only had the UIResponder.h file. Edit - this happened again. Had to delete the 'wire' to the next screen, then recreate - then option to get to the correct .m and .h files reappeared.

Solution 19 - Ios

I faced a similar issue and here's what I did I had a swift file and a xib file with its class connected to the swift file like so inside a group folder, and it doesn't show that they're connected.
But when I take them off the folder the assistant works somehow, so I took them off the folder and made an outlet from a UILabel then put them back inside the folder then they're permenantly connected.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAdd080bbAView Question on Stackoverflow
Solution 1 - IosAnna-Chiara BelliniView Answer on Stackoverflow
Solution 2 - IosMohammad SadiqView Answer on Stackoverflow
Solution 3 - IosresearcherView Answer on Stackoverflow
Solution 4 - IosLeandro FournierView Answer on Stackoverflow
Solution 5 - IosdoudouremiView Answer on Stackoverflow
Solution 6 - IosNikiView Answer on Stackoverflow
Solution 7 - IosortalPozniakView Answer on Stackoverflow
Solution 8 - IosMichael RobinsonView Answer on Stackoverflow
Solution 9 - IosVishuView Answer on Stackoverflow
Solution 10 - IosMehul ThakkarView Answer on Stackoverflow
Solution 11 - Iossweet-2View Answer on Stackoverflow
Solution 12 - IosnickcodiView Answer on Stackoverflow
Solution 13 - IosShirin ChawlaView Answer on Stackoverflow
Solution 14 - IosDavid KView Answer on Stackoverflow
Solution 15 - IosMikeView Answer on Stackoverflow
Solution 16 - IosmertView Answer on Stackoverflow
Solution 17 - IosslackwarsView Answer on Stackoverflow
Solution 18 - Iosuser3741598View Answer on Stackoverflow
Solution 19 - Iosأبو فهد Morphine pillView Answer on Stackoverflow