I created this application that contains several binary files (let's say X, Y and Z). I have a .plist file that specifies that the application should launch X when opened. Everything works fine 99.9% of the time but sometimes, it launches another binary (Y or Z).
This usually happens after something crashed in my application so I am guessing that this is a Mac OS mechanism that detects that something went wrong with a binary and try a different one.
This is very bad for me as my application becomes unusable until I uninstall and re-install it.
I have done only a little in Cocoa, so pardon my lack of knowledge, but here's my 2 cents:
You have an interesting problem. Clearly, you have multiple architectures or something at work here that requires multiple versions of the same Application. This is asking for trouble. If processor architecture is the primary concern, just use a universal binary. If your concern is more related to problems of Application condition, why not perform such logic inside a single binary? If the technology proves unreliable, just don't use it. Your customers will thank you. PS: Mac OS X does have some weird troubleshooting stuff it automatically does, especially with Property lists. Avoid letting the OS relaunch the App for you, then see if that works. There's always one last option: right(ctl) click on the App and say "Show package contents". Then double click on the right binary. There's no room for error that way.
Good Luck.