How to build multiple “Xcode” projects using shell script.
We are often in a situation where our Mac project involves several XCode projects and building them individually can be a lot of effort.
If you are a build engineer the following shell script can be handy.
Example :-
Step 1.1 – Absolute source path of XCode projects.
1) AnimatingViews=$scriptPath"/Developer/Examples/AppKit/AnimatingViews" 2) CircleView=$scriptPath"/Developer/Examples/AppKit/CircleView"
Step 1.2 – Change directory & run the configuration command for build the xcode project.
1 For Release build
cd "$AnimatingViews" xcodebuild -configuration Release -target AnimatingViews cd "$CircleView" xcodebuild -configuration Release -target CircleView
2 For Debug build
cd "$AnimatingViews" xcodebuild -configuration Debug -target AnimatingViews cd "$CircleView" xcodebuild -configuration Debug -target CircleView