Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
292 views
in Technique[技术] by (71.8m points)

xcodebuild - Xcode Post Build Copy File Actions

In Xcode, how can I call a 'shell script' which is a Perl script that copies the .app and .dsym files to a different directory?

I want to pass the name of the project and/or the project's root directory to the script. I want to have the script called every time I build in release and distribution modes but not in debug mode.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For anyone else who is wondering, you can also do a simple copy via

[Click on Scheme Name] -> Edit Scheme... -> [Select Scheme] -> Run "Target" -> Post-actions

and add a cp command. In my case, for quick testing and ease of use, I wanted to copy my binary back to the project directory so that I could process some data files. I used the following:

cp ${TARGET_BUILD_DIR}/${TARGET_NAME} ${PROJECT_DIR}/"binaryFileName"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...