Quantcast
Channel: User trojanfoe - Stack Overflow
Viewing all articles
Browse latest Browse all 226

Answer by trojanfoe for Xcode - How to run script just before build starts

$
0
0

The best approach is to create pseudo target in your project.

For example, say you have a shell script that sets the app version by updating an .xcconfig file:

  • Create a target called SetAppVersion of type Other> External Build System.
  • Leave the Build Tool at /bin/bash, set the Arguments to whatever script does the work, for example scripts/set_app_version.sh and set the Directory to $(PROJECT_DIR).

Now for any target affected by this script, simply make the SetAppVersion target a dependency of it, and it will run before any other action is performed on those targets.


Viewing all articles
Browse latest Browse all 226

Trending Articles


FLASHBACK WITH SIRASA FM AT GALGAMUWA 2022


Mp3 Download: Mdu - Mazola


Imitation gun was fired at motorist in Leicester road-rage incident


Ndebele names


MCKINNEY EMALINE “EMMA” OF WES...


Okra & Motia — The Workshop (Prod by Hammer)


Skint TV teen to be sentenced


Moondru Mudichu 19-09-2017 – Polimer tv Serial


YOSVANI JAMES Arrested by Miami-Dade County Corrections on Jan 10, 2017


Stories • Goddess Stepmom



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>