In Cocoa you can use NSBundle
to obtain the current bundle version number in your code, see for example this question.
How can you do the same thing at compile time? For example, if you want to make a compile time assertion based on the bundle version.
Maybe there is a predefined macro for that?