I'm experimenting running scripts with Xcode and have got a couple of questions:
1) Xcode says to drag n drop the script into the run script section but that creates an absolute path: /Users/Me/Desktop/Project/etc. which is obviously no use if somebody else or a CI machine checks out the code. How to specify a relative path?
2) There's a permission denied error during the build when the script gets executed.
(I'm using scripts off here to experiment with https://gist.github.com/sekati/3172554)
1) Edit your script with the following:
${SRCROOT}
${CONFIGURATION_BUILD_DIR}
2) Press ⌘+8, click Build
and read the error.
"$SRCROOT" gives the project folder:
i.e: Users/yourUserName/MyProject
but if you have a workspace folder with multiple projects inside: i.e: Users/yourUserName/MyWorkspace/MyProject
And you need just the workspace folder, use 2 dots:
"../SomeFodler" While someFolder will be created in the workspace folder.
Simple as that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With