Instruments fails to run app from command-line if Simulator has just loaded

Originator:mars.martian
Number:rdar://20613946 Date Originated:20-Apr-2015 01:24 PM
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification: Reproducible:Always
 
Summary:
If you open the iOS Simulator.app for a specific device and then run instruments from the command line for the same device, it will fail to run.
Previously (on Xcode 6.1) it would wait for the simulator to be ready before launching the app.

Steps to Reproduce:
echo "UIALogger.logDebug(\"Ran script\")" > test.js
export SIMULATOR_UUID=<...> # Pick the iPhone 5 one from `xcrun simctl list`
xcrun "../Applications/iOS Simulator.app/Contents/MacOS/iOS Simulator" -CurrentDeviceUDID $SIMULATOR_UUID &
instruments -v -w $SIMULATOR_UUID -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate com.apple.Maps -e UIASCRIPT test.js

Expected Results:
Should see output of the form:
Instruments : Starting Instrument(s)
2015-04-20 11:26:34 +0000 Debug: Ran script
Instruments : Stopping Instrument(s)

Actual Results:
Output shows up as:
Instruments : Starting Instrument(s)
Instruments : Stopping Instrument(s)
Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 8.) : Failed to launch process with bundle identifier 'com.apple.Maps'

Version:
Xcode 6.3, instruments 6.3 (57536)

Notes:
Fails when running under Xcode 6.3 but works correctly under Xcode 6.1.

Configuration:
Xcode 6.3, instruments 6.3 (57536)

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!