ios – Automating xctrace caught on “Stopping recording…”


I am utilizing xctrace to automate efficiency testing to seize hangs in an iOS app. The assessments consist of those steps:

  • Run our UI assessments with xcodebuild
  • For every UI take a look at case
    • Pause app runner
    • Begin xctrace in a subshell and wait till it is recording
    • Proceed the app runner
    • Wait till the UI take a look at is completed
    • Cease xctrace
    • Look ahead to recording to be saved
    • Proceed with subsequent take a look at

This works nice, however round as soon as each twenty runs, xctrace doesn’t exit, however appears to be caught on Stopping recording...

I am questioning what’s inflicting this and methods to repair it.

Beginning xctrace with:

xcrun xctrace file 
    --device <machine> 
    --attach <pid|identify> 
    --template <path|identify> 
    --time-limit 5m 
    --output recording.hint 
    >> hint.log 


And stopping it later with:

kill -INT $xctracePID 2>/dev/null
wait $xctracePID 2>/dev/null         # Typically will get caught on 'Stopping recording...'