The other way is to use the ‘codesign -d -vvvv’ command line function and process the result to figure out what code signature this application was signed with. If you choose this method, you want to verify against the “Developer ID” certificate.
The reason being is that you should be using the “Mac Developer” signature when debugging, use the “3rd Party Developer” signature for final testing and uploading to Apple. Once Apple release on the Mac App Store, they’ll use a different code signature.
Ultimately, you probably want a compile time constant, they way you can tell the compiler to ignore or include certain code depending on the target. A future version of App Wrapper will include a function for assisting in this.