ios-driver/ios-driver — pull request #313 by kumaravel-jayakumar (2014-11-11 12:03:59+00:00)
Title: Fixed Accessibility error and multiple instances error during instruments launch

Fixed SimulatorManager and SimulatorSettings to add 'com.apple.Accessibility.plist' file for enabling 'ApplicationAccessibilityEnabled' for applications. This seems to be the cause for the error logs of instruments
'ScriptAgent[1170:2f07] Failed to enable accessiblity, kAXErrorServerNotFound'.

Fixed 'InstrumentsCommandLine' to remove stale instances of iphonesimulator, There was this particular log in instruments while running in Xcode5.1.1.
'sim[2430:303] Multiple instances of launchd_sim detected, using com.apple.iphonesimulator.launchd.3bd855a instead of com.apple.iphonesimulator.launchd.59ef76ee.'
Due to this the instruments never seemed to start at all. I manually removed all the stale iphonesimulator launchd and tried to start which was successful. I have altered the code of InstrumentsCommandLine to fetch the stale iphonesimulators launchd and remove them before starting.