5

I've tried merging two branches on my Git repository and some conflicts occurred on my Storyboard file. Here are the conflicted lines:

    <resources>
        <image name="IconAddToCart" width="30" height="34"/>
<<<<<<< HEAD
        <image name="IconAddToCart" width="30" height="34"/>
=======
        <image name="IconCartBig" width="149" height="111"/>
>>>>>>> 0133fd1364e6e590034bba1c0e32273bcf22a3d2
        <image name="IconCheckmark" width="13" height="13"/>
        <image name="LoginBackground" width="320" height="568"/>
        <image name="LoginBackground" width="320" height="568"/>
        <image name="LoginLogo" width="257" height="73"/>
        <image name="ScanButton" width="178" height="61"/>
    </resources>
    <color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
    <simulatedMetricsContainer key="defaultSimulatedMetrics">
        <simulatedStatusBarMetrics key="statusBar"/>
        <simulatedOrientationMetrics key="orientation"/>
        <simulatedScreenMetrics key="destination" type="retina4"/>
    </simulatedMetricsContainer>
    <inferredMetricsTieBreakers>
        <segue reference="rCk-dF-YMq"/>
        <segue reference="SKx-bH-AaC"/>
        <segue reference="ofx-gD-lnj"/>
        <segue reference="Eo1-ee-RYE"/>
        <segue reference="mb5-Kc-qz1"/>
        <segue reference="qYH-kM-beE"/>
        <segue reference="QOW-kb-Y6W"/>
<<<<<<< HEAD
        <segue reference="vKq-do-lYa"/>
=======
        <segue reference="CgX-ql-qnP"/>
        <segue reference="gwc-Z9-zHd"/>
>>>>>>> 0133fd1364e6e590034bba1c0e32273bcf22a3d2
    </inferredMetricsTieBreakers>

I've tried fixing the conflicts by removing the lines of code that are duplicated and and removing the conflict marks, and this is how that part of the file looks now:

<resources>
    <image name="IconAddToCart" width="30" height="34"/>
    <image name="IconCartBig" width="149" height="111"/>
    <image name="IconCheckmark" width="13" height="13"/>
    <image name="LoginBackground" width="320" height="568"/>
    <image name="LoginBackground" width="320" height="568"/>
    <image name="LoginLogo" width="257" height="73"/>
    <image name="ScanButton" width="178" height="61"/>
</resources>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
    <simulatedStatusBarMetrics key="statusBar"/>
    <simulatedOrientationMetrics key="orientation"/>
    <simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
    <segue reference="rCk-dF-YMq"/>
    <segue reference="SKx-bH-AaC"/>
    <segue reference="ofx-gD-lnj"/>
    <segue reference="Eo1-ee-RYE"/>
    <segue reference="mb5-Kc-qz1"/>
    <segue reference="qYH-kM-beE"/>
    <segue reference="QOW-kb-Y6W"/>
    <segue reference="vKq-do-lYa"/>
    <segue reference="CgX-ql-qnP"/>
    <segue reference="gwc-Z9-zHd"/>
</inferredMetricsTieBreakers>

Even after that, the compiler still gives me the following error: The document "Main.storyboard"could not be opened. The operation couldn't be completed. (com.apple.InterfaceBuilder error -1.)

What can be the cause of the error, if I've already removed those lines?

Andra Todorescu
  • 628
  • 10
  • 27
  • Have a look at http://stackoverflow.com/questions/12725116/the-document-mainstoryboard-storyboard-could-not-be-opened – Chiron Dec 11 '13 at 17:28
  • In addition to the last answer...XIB's files can't be edited by two persons at the same time, so when you try to merge your files it will say that can't be opened. Merging XML's files (that's what a XIB file is at the end) is a pain in the you know what. So, my advice is that you coordinate who's going to touch each XIB file. – Sophy Swicz Dec 11 '13 at 17:40
  • This line is duplicated: ``. Xcode 5 can repair this (and tells you that this could have happened because of SCM merging), but maybe you use an older version of Xcode which probably can't fix this. – Vili Jan 27 '14 at 08:12
  • @Vili please post your comment as an answer so I can check it. Thanks! :) – Andra Todorescu Jan 27 '14 at 15:55

1 Answers1

3

This line is duplicated:

<image name="LoginBackground" width="320" height="568"/>

Xcode 5 can repair this (and tells you that this could have happened because of SCM merging), but maybe you use an older version of Xcode which probably can't fix this.

Vili
  • 1,599
  • 15
  • 40