facebook/xctool — pull request #422 by ExtremeMan (2014-09-16 18:23:34+00:00)
Title: Resolve symlinks in sdk paths and improve default simulator selection approach.

In this commit 2 problems are resolved, both could happen only if `-destination` option is not specified:
1) If xcodebuild is using latest sdk then sdk path could contain symlinks which should be resolved before trying to find appropriate `DTiPhoneSimulatorSystemRoot` instance to use. For example, in Xcode 6 last path component of `/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk` is symlink pointing to `iPhoneSimulator.sdk` in the same directory.
2) It could happen that `SimRuntime` supports `SimDeviceType` but there is no available configuration of device with that runtime and device type. It is better to loop through available devices and choose the one that is available.