Reputation: 47
I am trying to build this app for school using the simulator but whenever I try to build it I get this error:
The document "MainStoryboard_iPhone.storyboard" could not be opened. Line 134: XML
declaration allowed only at the start of the document
I go to the Issue navigator but that is all it shows. There are no errors shown in the code.
Here is the section where line 134 is in the XML source code:
</view>
<tabBarItem key="tabBarItem" title="Item 1" id="JGk-R6-tUe"/> //This
is line 134
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="2cL-Ur-7Xa"
userLabel="First Responder" sceneMemberID="firstResponder"/>
Upvotes: 1
Views: 6599
Reputation: 5334
You can right click on the Storyboard file and view it as XML source code.
From there you can go to the offending line, read the XML and make edits that in your best judgement will fix it.
Upvotes: 2
Reputation: 4729
Either edit the storyboard file so that Xcode re-saves it or open it in a text editor and see if line 134 needs to be edited or deleted. It sounds like somehow there is a second tag saying that it is an XML file on line 134.
Upvotes: 1