This repository was archived by the owner on Feb 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
This repository was archived by the owner on Feb 1, 2018. It is now read-only.
Xcode 6 issue #76
Copy link
Copy link
Open
Description
At least for my two machines, there is no longer a full path to Automation.tracetemplate. Running xcrun instruments -s I'm left with the following templates:
Known Templates:
"Activity Monitor"
"Allocations"
"Automation"
"Blank"
"Cocoa Layout"
"Core Animation"
"Core Data"
"Counters"
"Dispatch"
"Energy Diagnostics"
"File Activity"
"GPU Driver"
"Leaks"
"Multicore"
"Network"
"OpenGL ES Analysis"
"Sudden Termination"
"System Trace"
"System Usage"
"Time Profiler"
"UI Recorder"
"Zombies"I haven't done much digging into this, but it runs fine for me if I adjust the [-t template] option via a slight code tweak like so:
def path_to_automation_template
template = nil
`xcrun instruments -s 2>&1 | grep Automation.tracetemplate`.split("\n").each do |path|
path = path.gsub(/^\s*"|",\s*$/, "")
template = path if File.exists?(path)
break if template
end
template || 'Automation' #ADDED HERE
endWe're back in business. I'm not sure if it's safe to assume this as a default, however. Without this, you'll get the following error message:
2014-09-22 17:21:22.000 instruments[9053:1007] *** -[__NSCFConstantString stringByAppendingPathExtension:]: cannot append extension 'tracetemplate' to path ''
Instruments Usage Error : The specified template '' does not exist.
instruments, version 6.0 (56156)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]