The Builder interface could not determine the type "Main.storyboard". This may be due to the lack of SDK.

I get a strange error when I try to view a specific project storyboard in Xcode. When I click the storyboard in the file directory, I get a warning that says: "The Builder interface could not determine the type of" Main.storyboard ". This may be due to the lack of an SDK."

This only happens with this particular storyboard, I tried to create another storyboard, and I was able to view it just fine. I tried to return to the previous version of the project when I managed to open the storyboard, but, oddly enough, this does not fix the error, and I get the same warning. I also tried to open the project in an earlier version of Xcode, but to no avail.

If it provides more context, I get an error for the storyboard that I get when I try to create a project that reads: "The operation could not be completed (error com.apple.InterfaceBuilder 2001.)"

Any ideas on what causes this and how to fix it?

+5
source share
5 answers

I had the exact same problem. I would not delete it, instead I used grep to search for a file in the project directory, that is, "$ grep -r" Main.storyboard ".

Once you find it, you can use the editor (vim or possibly emacs) to view the actual file, as it may be corrupted, but in my case I merged into the branch added to the file during automerge:

<<<<<<< HEAD document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="gHi-tD-tmJ" ======= document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r" >>>>>>> develop 

If you have the same problem as me, just remove either the head or the tail of it - depending on what you don't want. If you have problems with conflict resolution, contact here:

https://githowto.com/resolving_conflicts

or

https://help.github.com/articles/resolving-a-merge-conflict-from-the-command-line/

+8
source

It is less complicated than you think.

The error is due to the fact that you made a mistake in the source code of Main.storyboard, for example, you accidentally put "ƒ" in front of the first open tag Main.storyboard.

1) What you have to do is remove Main.storyboard (select throw to Trash)

2) Go to the basket, move Main.storyboard to the desktop, open any text editor and correct the code; then select all and copy.

3) On Xcode, create a new Main.storyboard, and then right-click on the file and select Open As → Source Code, then paste the fixed code that you have in your clipboard.

4) Right-click the file and select Open As → "Interface Builder - Storyboard".

Hope this works for you.

+2
source
  • Delete the file from the woking copy, if you have one.
  • and apply the wallet.
  • Resolve the conflict and run again.

I hope this works.

0
source

I got this error because I copied and pasted the XML format directly into the xib file. This led to unknown file endings. As soon as I converted to the end of a UNIX line, the solution compiled without errors.

0
source

If you have resolved the conflicts and still have this problem, close Xcode and run your project again. It helps me.

0
source

Source: https://habr.com/ru/post/1240145/


All Articles