private File extract ( InstrumentsVersion version ) { if ( version . getBuild ( ) == null ) { throw new WebDriverException ( "you are running a version of XCode that is too old " + version ) ; } extractFromJar ( "instruments" ) ; extractFromJar ( "InstrumentsShim.dylib" ) ; extractFromJar ( "ScriptAgentShim.dylib" ) ; if ( version . getMajor ( ) >= 6 ) { extractFromJar ( "DTMobileISShim.dylib" ) ; } extractFromJar ( "SimShim.dylib" ) ; extractFromJar ( "README" ) ; File instruments = new File ( workingDirectory , "instruments" ) ; instruments . setExecutable ( true ) ; return instruments ; }
extract the binaries for the specified version of instruments .