I've been fighting my way through receipt validation using Apple's code and a few guides on the internet. At this point, I've managed to sign the code, and start to validate to validate the receipt. At this point, it would be helpful to see this part of the Apple's documentation if you're not familiar with it:
Validating App Store Receipts # Validate during development process
When I launch the app within XCode, the app exits with code 173 as expected (there isn't a receipt to validate). When I launch the app outside of XCode (double click in finder), the app launches for a split second, closes, and a login dialog pops up (as expected). I've created a test account in iTunes Connect, and log in with this account. Once hitting the login button, a progress indicator spins for a couple of seconds and then the login box disappears. Nothing happens after this as far as I can tell. As I understand things, the App Store should automatically generate / pull a receipt and launch the application at this point, but it doesn't.
I've tried to observe the application launch process a bit better. I put in some printf's at each point of the receipt checking process, but I can't figure out where these would be printed. (Launching the app in the terminal using 'open' doesn't show any output at all.) I've tried using NSRunAlertPanel to generate dialog boxes, but I don't think enough of the app is loaded when the receipt checking occurs for them to come up properly.
At this point, I'm not sure how to debug the problem further due to not being able to really observe what's going on.