You may be able to get the version number populated by adding an
Info.plistto your command-line tool. See the Create Info.plist Section in Binary (
CREATE_INFOPLIST_SECTION_IN_BINARY) build setting.
This above is a good idea in general, but it’s not how I’d solve this particular problem. Rather, you should keep a table that maps between your version numbers and the main executable’s Mach-O UUID. That UUID is included in the crash report, so you can just look up the version from there.
This has a couple of benefits:
The UUID identifies a specific build, whereas the version number tends to get tangled up with marketing concerns.
The UUID also ties the executable to its
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
Thank You very much