FileMerge error message when used with Git difftool
Asked Answered
W

6

16

I use FileMerge as the difftool tool for Git. Recently, I started receiving a weird error message:

Unable to load platform at path /Applications/Xcode.app/Contents/
   Developer/Platforms/iPhoneOS.platform

FileMerge still performs the diff just fine (although it takes a bit longer to load). Any idea what's causing this, and how to fix it?

Whisker answered 4/12, 2012 at 2:32 Comment(4)
Same here for SVN. Are you using a wrapper for opendiff (like fmdiff)?Superannuation
@Superannuation - No, just plain vanilla opendiff.Whisker
Also the same here with hg.Beautifully
FWIW, all these went away after updating to the latest version of XCode.Whisker
R
3

I had exactly the same problem while using FileMerge as a diff tool for svnX. The following command solved my problem:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

That's all.

Raynata answered 22/3, 2013 at 9:6 Comment(0)
T
1

To expand on user3761183's answer, after a bit of googling I ran:

sudo plutil -convert xml1 /Applications/Xcode.app/Contents/Developer/Platforms/*.platform/Info.plist

That got rid of all the Unable to load platform at path /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform errors. I'm still getting errors about:

Couldn't load '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/Core Build System.xcspec'. Reason: Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character b at line 1" UserInfo={NSDebugDescription=Unexpected character b at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected ';' or '=' after key at line 1" UserInfo={NSDebugDescription=Unexpected ';' or '=' after key at line 1}}.

But I was getting them originally too, so if you aren't then the above command should solve your problems.

EDIT: removed comment about Install addtional required components that did nothing. Next guess is reinstalling XCode as Jonathan F suggests.

FWIW I tried sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/ already and that did nothing too.

Terra answered 12/4, 2017 at 0:15 Comment(0)
P
0

This appears to be a problem with Mercurial, too: Unable to load platform at path

If you don't develop for iOS, you can just delete that folder. If you do, you'll have to re-install XCode. (Unless you can figure out how to re-install just that platform).

I'm thinking you're better off just re-installing XCode, as there are some other SO questions dealing with platform related problems (not this specifically, but similar in nature) that all seem to point to reinstalling XCode:

XCODE fail to load platform

and

Xcode won't open: "Mac OS X platform is missing"

....so start re-installing and go get a beer!

Patrizia answered 5/3, 2013 at 22:27 Comment(0)
C
0

for me, converting all *.platform/Info.plist from binary to xml1 fixed the problem. strange ...

Chromogen answered 20/6, 2014 at 18:24 Comment(1)
Welcome to Stack Overflow! Please read "How do I write a good answer?Fa
L
0

I use XCode for my $ git mergetool and have gotten similar errors. For me, it's been related to XCode's components/simulators and documents.

Go to XCode -> Preferences -> Downloads and make sure you have the latest components and documents.

I'm only here because I updated to XCode 7 and I'm getting similar errors because of Apple Watch documentation combined with my employer letting our dev license expire...

Levi answered 25/9, 2015 at 14:13 Comment(0)
A
0

Regarding the problem highlighted by jim in his answer, related to the "Unexpected character b at line 1" error, I found that Core Build System.strings and Native Build System.strings files at the path specified by the error message i.e. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/ are in some sort of binary format. The parser doesn't expect this and complains about the character b of the word bplist opening the file. Maybe playing with plutil as in the "platform problem" which the OP was asking about can help. I simply substituted the two files with versions from a Xcode 6 dmg, where they are in ASCII format and the problem vanished

Apogamy answered 6/1, 2018 at 16:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.