If I am building a dynamic library called Awesome
, Xcode outputs the built product as libAwesome.dylib
. Is there a way to have Xcode insert the filename, so it gets built as libAwesome.1.0.0.dylib
开发者_如何学运维?
Set your Product Name
to Awesome.${DYLIB_CURRENT_VERSION}
.
DYLIB_CURRENT_VERSION
is set by Current Library Version
in the build settings.
Oh, and to see a list of all such environment variables, just make a new Run Script Build Phase
, leave it empty, but check the "Show environment variables in build log" box, and then build. If you show the log for that build phase, it'll show all the environment variables along with their values. And then you can use them in the same way as above.
精彩评论