OS X

Diagnostic

Most issues can be diagnosed by looking at the console logs. Launch the Console application (located under /Applications/Utilities), and look into the All Messages logs:

If the application is built in Debug mode you, the validation code prints debug messages.

If you see storeagent: promptResponse: <CKSignInPromptResponse:0x01234567 returnCode:-1>, then test user credentials are wrong.

If you see storeagent: promptResponse: <CKSignInPromptResponse:0x01234567 returnCode:1>, then test user credentials are ok and the problem may be in the declaration of the application on the iTunes Connect portal.

If you see storeagent: Unsigned App, then the application is either not properly signed or the storeagent rejects the signature.

Launch Issues

If you see a dialog "XXX" is damaged and can't be opened., then there is a cache issue with one of the StoreKit daemon.

Open a Terminal and execute the following commands:

killall storeaccountd
killall storeassetd
killall storedownloadd
killall storeinappd
rm -r ~/Library/Caches/storeaccountd
rm -r ~/Library/Caches/storeassetd
rm -r ~/Library/Caches/storedownloadd
rm -r ~/Library/Caches/storeinappd

This will kill all the daemons and reset the caches. A failed validation should properly show the credential dialog.

Common Issues

When I test receipt validation, the Original Bundle Version is always empty. What is wrong ?

The behavior of this attribute is the following:

When testing receipt validation on OS X 10.9+ or iOS 7+, the attribute always contains "1.0". On other version of OS X, the attribute never seems to contain a value. It may be related to the way test receipts are generated.

When I launch my application, no receipt is retrieved. What is wrong ?

First, check that:

It is REALLY REALLY important to properly define the application in the iTunes Connect portal. Then, you may also open the Console application (located under /Applications/Utilities), and look into the All Messages logs:

When I launch my application, I get a "XXX.app is damaged and can't be opened". What is wrong ?

The causes for this problem may be multiple:

In some rare cases, even if everything is ok, the wrong version is retrieved in the receipt. This seems to be linked to a caching issue in the storeagent daemon:

On OS X 10.6 to 10.9:

On OS X 10.10:

I can get a valid receipt, but when I make an InApp purchase, I get a message "Your Apple ID has been disabled [Environment: Sandbox]" ?

Unfortunately, your Apple ID is definitively disabled. There is no way (apart from contacting the support) to re-enable it.

The most probable cause is that you have try to log in the Mac App Store application, and Apple has disable the account. A good rule of thumb is to avoid the use of the Mac App Store application during the tests (i.e. log off and quit).

iOS

Diagnostic

Most issues can be diagnosed by looking at the console logs. In Xcode, open the Organizer window. Plug the device. Once ready, select the device and click on the Console item:

If the application is built in Debug mode you, the validation code prints debug messages.

Common Issues

When the receipt refresh request is triggered, I can only enter my password. How to enter my test credentials ?

In order to use your test credentials, you have to log-off from the iTunes Store and AppStore. Go to Settings > AppStore and click on your identifier, then log-off. The next time a receipt refresh request is triggered, you will be able to enter your test crendentials.