0

Is there any way to get this path in a pre-action run script?

/Users/user-name/Library/Application Support/iPhone Simulator/6.0/Applications/8F3F9CBC-F96A-48C1-9CE9-BE32D0E0B833

This would be called after the build so it should be there, the environmental variable I really need to find is 8F3F9CBC-F96A-48C1-9CE9-BE32D0E0B833

Is there a variable like IPHONEOS_DEPLOYMENT_TARGET for that?

fzf
  • 931
  • 1
  • 9
  • 19
  • 1
    You should look in http://stackoverflow.com/questions/6910901/canonical-list-of-xcode-environment-variables for something that suits you. – Olotiar Nov 16 '12 at 08:10
  • I looked through all those variables and am not able to find a reference to that dir. – fzf Nov 16 '12 at 09:23
  • Well, these are all the variables in the environment at build time – Olotiar Nov 16 '12 at 09:58

2 Answers2

1

Rather than searching in the finder for which GUID is of your running app, Just type po NSHomeDirectory() in the xcode debugger it will return you the path of the running application. Cut and paste into Go>Go To Folder (Cmd-Shift-G).

AsimRazaKhan
  • 2,154
  • 3
  • 22
  • 36
0

I was able to get to it with a find command like below:

APP=`find "/Users/$USER/Library/Application Support/iPhone Simulator" -name 'Foo.app' -type d -mtime -1`

mtime option limits to the ones created today; another option is to pass in the version of the simulator you are targeting.

find "/Users/$USER/Library/Application Support/iPhone Simulator/$1" -name "$2"
kat
  • 577
  • 4
  • 7