Am facing a strange issue on my Xcode 10
. Whenever I get conflict on storyboard
or plist
, Xcode
does not showing me the proper way to resolve conflicts. See the screenshot which is an example of storyboard
case. If I get the conflict on plist
file, then I can't even open it (Xcode
saying the file is not proper format). Right now am using Xcode 9.4
to resolve this issue. Is there a way to fix it in Xcode 10
. Thanks in advance.
If I get the conflict on plist file, then I can't even open it (Xcode saying the file is not proper format)
Of course you can’t. Once the conflict has occurred, and the git marker text is inserted into the file, the file is not in the proper format — it is no longer a pure XML plist file.
The usual way to see the text within Xcode is to control-click on the storyboard or plist file in the navigator and choose Open As > Source Code.
What I personally do, however, is to open the file using BBEdit. Either way, you are now looking at the text with the git markers in it.
Now just edit the text directly, resolving the conflict and eliminating the markers to restore order. Now mark the merge as resolved and commit.
For example, in the above example we have this text:
<<<<<<< HEAD
<string>3</string>
=======
<string>2</string>
>>>>>>> branch
So we would delete the <<<
line, the ===
line, the >>>
line, and one of the remaining two lines. Now we can mark the conflict as resolved, commit, and proceed.
It is possible to view and compare the conflicting versions in the Xcode comparison view:
But I don’t think it brings you any advantage to do so.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With