Thursday, July 7, 2011

An update on Mac App Store compatibility

We have gotten some reports that people can't submit their applications to the Mac App Store with Application Loader 1.4.1. Specifically, it would give an error about missing required architectures. It is possible to work around this by using Application Loader 1.4. However, it is likely that Application Loader 1.4 will stop working in the near future.

At WWDC we spoke with an Apple engineer about this and we are pleased to announce that this issue has been fixed in Real Studio 2011r2. We highly encourage all users who are currently submitting or intend to submit their applications to the Mac App Store to upgrade to the most recent release.

In terms of technical details, the problem was that the Real Studio linker was not emitting the LC_UUID load command in generated Mach-O binaries. This load command is essentially a unique identifier for your program and allows Apple to group together crash logs (and other information we don't even know about). We now generate the proper information, which can be verified by running 'otool -l', like so:

[joe@Mac-Pro.local ~] otool -l "/"
Load command 11
cmdsize 24
uuid 15416171-690E-4D46-B15F-AD456B1EA572


Mark said...

Hi Joe, is there a way for us users still currently relying on older RS versions to do the same thing from terminal or similar to "patch" things?

Joe Ranieri said...

While it's theoretically possible that someone could write a tool to add the load command after the fact, we do not intend to do so.

If anyone reads this and *does* decide to make a tool, please be aware that the Mach-O documentation is incorrect and LC_UUID is not actually a random UUID. Instead, it's an MD5 hash of the binary (with the LC_UUID load command there, but a zero filed UUID). Then that MD5 hash is altered to look like a UUID by twiddling a few bytes. For details on that part (and guidance in general), see the ld64 source code and search for "rdar://problem/6723729".