4

I am running Xcode 9.2 on 10.13.3 and just today ran into a problem with Xcode not recognizing Main.storyboard on an app that I am building. It worked on Friday and then today when I opened the app to work on it I get the following error:

.../Base.lproj/Main.storyboard: Interface Builder could not open the document Main.storyboard" because it does not exist.

Visually the file is there but does not respond. It is listed correctly in info.plist.

I tried pulling versions from Time Machine from last week and I still get the same error.

Is there anything short of rebuilding the storyboard that I can do to get Xcode to recognize it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
forrest
  • 10,570
  • 25
  • 70
  • 132
  • Did you try Removing the storyBoard and Re-Add it in Main Bundle ? Just make Copy of your Storyboard and Delete it from Xcode Project and Again Drag And drop the copy made in Xcode Project with check **Copy items into destination group's folder (if needed)** – iOS Geek Feb 27 '18 at 05:00
  • Also check https://stackoverflow.com/q/18860534/6080920 Other options are Also Provided there – iOS Geek Feb 27 '18 at 05:01
  • Thanks iOS Geek. The solution was in there. The location was set relative to the SDK instead of the app. – forrest Feb 27 '18 at 15:31
  • So if my answer helped should I post it as A Answer else you can close this thread – iOS Geek Feb 28 '18 at 03:59
  • Yes, you can post as answer. The one that worked though was the path issue you mentioned in number two above. – forrest Feb 28 '18 at 19:12

5 Answers5

5

Did you try Removing the storyBoard and Re-Add it in Main Bundle ? Just make Copy of your Storyboard and Delete it from Xcode Project and Again Drag And drop the copy made in Xcode Project with check Copy items into destination group's folder (if needed)

And

Also check

Link - Interface Builder could not open the document ".storyboard" because it does not exist

Other options are Also Provided there

iOS Geek
  • 4,825
  • 1
  • 9
  • 30
  • Thanks. The solution that worked for me was the one referenced in the link to set the path relative to Group. For some reason, mine had switched to relative to SDK. – forrest Mar 01 '18 at 16:59
4

When you upload your file to google drive without zip, it appends the extension of .storyboard to .xml automatically and hence when you download it obviously the file won't exist. To solve this issue, go to the [project folder]>[Project folder]>[Base.lproj]. There would be a .storyboard.xml extension type of file which you would have to rename it to the .storyboard extension. And hence your work is done.

Story board error solving visual guide.

smit mehta
  • 101
  • 1
  • 4
2

Delete derived data. The location is under xcode>preferences

stevenpcurtis
  • 1,907
  • 3
  • 21
  • 47
0

Follow below steps:-

1.Save a copy of the affected file outside of the project 2.Delete the file from the project, selecting Move to Trash to completely 3.delete the file and reference from the project 4.Edit ProjectName.xcodeproj/project.pbxproj to remove all lines referencing the affected file Re-add the file, making sure to check Copy items into destination group's folder (if needed) 5.Clean and build

Dipak Dhondge
  • 115
  • 1
  • 9
0

Try opening Xcode and go to runner then double click on the main storyboard then uncheck runner , that worked for me.

Rotich
  • 1