How can I set the instruments path in Appium

286 views
Skip to first unread message

Daniel Puterman

unread,
Aug 25, 2013, 2:08:44 AM8/25/13
to appium-...@googlegroups.com
Hi,

I'm using Appium on Mac. When I try to run Appium, it seems that the path to Instruments is empty. It would be a great help if I knew how to set the path to instruments (should I do it using an environment variable? manually?).

Here's the log I'm getting:

debug: Creating instruments
info: instruments is: 
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Spawning instruments with command:  -t /usr/local/lib/node_modules/appium/app/uiauto/Automation.tracetemplate /var/folders/rd/z5t93lfj0cx0wm2_hqmthnkr0000gn/T/TestApp.app -e UIASCRIPT /usr/local/lib/node_modules/appium/app/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments/

Just as a general explanation, this happened after I uninstalled XCode 3.3 (I had both 3.3 and 4 on my Mac). Before uninstalling Appium used to go to /Developer/usr/local/bin/instruments. Now it's just empty,


Thanks!
Daniel
 

Daniel Puterman

unread,
Aug 26, 2013, 4:49:22 AM8/26/13
to appium-...@googlegroups.com
Ok, After some digging in the code it appears Appium takes its "Instruments" path by using the command: 
 
xcrun -find instruments

xcrun itself has cache, so if you changed/removed xcode you should probably run
xcrun -kil-cache -find instruments

This will clear the cache, but will not necessarily point xcrun to the right path. In order to do so you should add the environment variable DEVELOPER_DIR to point to the Xcode developer directory (e.g., /Applications/Xcode.app/Contents/Developer/).

Good luck to all,

Daniel
Reply all
Reply to author
Forward
0 new messages