开发者

Can Xcode insert the version number into a library's filename when building?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜