tags:

views:

963

answers:

4

I'm developing an iPhone app and doing ad-hoc distribution for beta testing. My users are sending me crash logs that say this:

Identifier:      MyAppName
Version:         ??? (???)
Code Type:       ARM (Native)

I can't understand how to replace those question marks with a real version number. I've configured my Info.plist to include a CFBundleVersion and a CFBundleShortVersionString, but that didn't help... crash logs still just contain question marks instead of the version number I expect.

How do I set my version so it will show up in crash logs?

EDIT Apparently, due to a possible bug in the iPhone CrashReporter, there's no way to set the "Version" properly. But is there a workaround? Some other way to insert a version number (e.g. a build number or SCM revision number) in the crash log metadata?

+3  A: 

This seems to be the case for all iPhone apps, including the ones from Apple. You can look through all of the iPhone application crash logs for your devices in Console:

FILES/~/Library/Logs/CrashReporter/MobileDevice/...

Everything in that list shows up with unknown versions for me, except for MobileSafari, which has slightly different information:

OS Version:          iPhone OS 2.2.1 (5H11)
Date:                2009-02-15 02:19:06 -0600

All other applications, including Apple's Calendar & Mail apps, show up with question marks for their version numbers.

It seems that other developers have noticed the same thing. It is probably a bug in the iPhone's CrashReporter program.

e.James
Thanks. Is there any workaround? Some other way to insert a version number (e.g. build number or SCM revision number) in the crash log metadata?
Dan Fabulich
Not that I know of, unfortunately. I'm already out of my league on this stuff :)
e.James
A: 

Your app needs a CFBundleVersion and it is good to have both CFBundleVersion and CFBundleShortVersionString.

CFBundleVersion should contain your full version info, such as build number, SCM revision, git sha hash, or a combination of all of these.

CFBundleShortVersionString should contain your human-readable version number, such as 2.0.1.

PS: this doesn't answer your question directly, but I thought it might be helpful.

Kenneth Ballenegger
+1  A: 

For adhoc and beta testing, just change your identifier. MyAppNameV1.0b36 instead of MyAppName Obviously this won't work for your App Store version, but it will get you through beta testing.

Note that this probably requires a wildcard ad hoc profile, but these can be easily made through the developer portal.

Kailoa Kadano
I couldn't get the wildcard ad hoc profile to work, but the developer portal always requires a lot of fidgeting.
Dan Fabulich
+6  A: 

The easiest method is to save the UDIDs of all the binaries you distribute, and compare them to the UDIDs in the crash dumps. UDIDs are different for each build you make.

To retrieve the UDID:

$ dwarfdump -u /path/to/MyApp.app/MyApp
UUID: 864F3D54-F165-3356-3292-2C9C48E97C55 (armv6) /path/to/MyApp.app/MyApp

And compare it to the crashlog:

Binary Images:
    0x1000 -    0x5ffff +MyApp armv6  <864F3D54F165335632922C9C48E97C55> /var/mobile/Applications/5FB3933B-348E-42D7-B99F-76DE284D2148/MyApp.app/MyApp
rpetrich
Best of a bad situation, I guess.
Dan Fabulich
Yeah... the system with the version number was really convenient when it worked.
rpetrich