Unable to load platform at path
Asked Answered
Y

5

46

When using filemerge to solve HG conflict, I got the following error

FileMerge[18002:707] Unable to load platform at path
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
Yesterday answered 27/9, 2012 at 8:58 Comment(1)
Is there a solution to this for those that DO develop iPhone apps?Micropathology
S
21

I have the same FileMerge warning in Git. When I look inside Xcode's preferences, I can see that neither the iPhoneSimulator nor the iPhoneOS platforms are installed but the directories do exist when I look into "/Applications/Xcode.app/Contents/Developer/Platforms".

I don't develop for iOS, so I deleted both iPhoneOS.platform and iPhoneSimulator.platform and the warning went away.

If you do need those platforms, try to reinstall them properly from Xcode.

Semitic answered 4/3, 2013 at 11:6 Comment(7)
I suggest renaming the requisite files initially to see if this fixes the issue. Delete (if at all) when you're sure.Announcer
Yep, it works, thank you! The path may differ, though. I my case I had to delete /Applications/Xcode.app/Contents/Developer/Platforms/iPhone*.Probably
@Matt: I agree that one should be cautious when deleting stuff, especially in Terminal since there is no bin you can go back retrieve stuff from there, unlike in Finder. However, renaming did not work. It just gives the same error message with new names. What you can do is cd /Applications/Xcode.app/Contents/Developer/Platforms/; sudo mkdir movedIosStuff; sudo mv iPhone* movedIosStuffIbrahim
Damn... I accidentally downvoted this answer and upvoted the other one (by iphonemaclover) instead of the other way around, and now I can't undo it. Terribly sorry about that, @nox!Ibrahim
@Nagel: Oh, that's good to know--at any rate, a non-destructive operation.Announcer
Thx nox, it works. As @Ibrahim pointed out no need to delete. It looks like it searches for directories ending in .platform. This works too: cd /Applications/Xcode.app/Contents/Developer/Platforms/; sudo mv iPhoneSimulator.platform iPhoneSimulator.platform_RENAMED-TO-AVOID-FILMERGE_ERROR; sudo mv iPhoneOS.platform iPhoneOS.platform_RENAMED-TO-AVOID-FILMERGE_ERRORBrachial
This other answer to this question worked for me and is less invasive.Peanuts
V
10

And I tried converting iPhoneSimulator.platform/Info.plist from binary to xml, confirmed that Filemerge doesn't produce the error anymore. Then I converted it back to binary, and still, Filemerge is fine.

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
$ sudo plutil -convert xml1 Info.plist
$ sudo plutil -convert binary1 Info.plist

Disclaimer: inspired by @user3761183!

Validity answered 9/11, 2014 at 10:56 Comment(4)
This worked for me as well, and is the least invasive option.Peanuts
In my case, converting the files back to binary restored the error message. Keeping them as XML keeps the message away.Kynewulf
Converting to XML works for me temporarily ( > 1 day for sure), but it always ends up resetting, so I have to do it again at some point down the line. Having done this half-a-dozen times now, I'm looking for a more permanent solution.Bobbiebobbin
@Bobbiebobbin A launch daemon that re-converts the plist to XML everyday? ;DJonahjonas
M
6

I tried converting all *.platform/Info.plist from binary to xml1 and it fixed the problem. Strange ...

Murr answered 20/6, 2014 at 18:14 Comment(0)
H
3

i face the same problem following command solved my problem:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
Heliotropin answered 3/7, 2013 at 6:48 Comment(2)
This did not work for me, I still got the same error message afterwards. What is this command supposed to do?Ibrahim
This sets the active developer directory. However, the question states that the directory exists, so clearly the developer directory is already set. This command does nothing.Micropathology
T
3

There is a simple solution to this issue that worked for me. I merely started up Xcode and created an iOS playground project. Xcode asked me to enable developer mode on the Mac, which I did. I then closed Xcode, deleted the project and the filemerge error was no more.

Running Xcode version 6.2

Theurer answered 11/3, 2015 at 10:17 Comment(1)
That's the way to go! Works fine with 10.10.3.Devilmaycare

© 2022 - 2024 — McMap. All rights reserved.