forrest
forrest

Reputation: 11012

Why doesn't Xcode recognize Main.storyboard?

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?

Upvotes: 4

Views: 7987

Answers (5)

Rotich
Rotich

Reputation: 1

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

Upvotes: 0

smit mehta
smit mehta

Reputation: 101

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.

Upvotes: 4

iOS Geek
iOS Geek

Reputation: 4855

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

Upvotes: 5

Dipak Dhondge
Dipak Dhondge

Reputation: 115

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

Upvotes: 0

stevenpcurtis
stevenpcurtis

Reputation: 2001

Delete derived data. The location is under xcode>preferences

Upvotes: 2

Related Questions