Problem getting MAS receipt after build for testing

Build app. Drag to App Wrapper 3 and wrap for App Store. Select “Test Installer” from App Wrapper menu and install app named “Verify App and In-App Purchases”. Launch app from Finder and get App Store sign in dialog. Sign in using a Test User ID. Get the following message dialog:

Anybody see this behaviour and determine the cause?

When things start getting strange signing in using Test Used ID, I logout from the Mac, login again, and re-launch the app signing in using the last used Test User ID.
Hope it helps.

More fun and games ahead; it seems like 1 of 2 things.

#1 The receipt verification code is failing when it shouldn’t.
#2 The App Store receipt is bogus, occasionally the App Store agent creates a bogus receipt and to make matters worse caches it!

In your receipt verification code, make sure that the apps bundle ID is correct and if possible disable version number checking.

I restarted the Mac and no longer getting the damaged app dialog. Thanks Carlo.
Now I see in the Contents folder that there is a _MASReceipt.
BUT I may be seeing the problems Sam mentioned above. Now in a loop with the app automatically starting then quitting and I keep getting asked to sign in to the App Store. The Console shows

[quote]2016-05-05 4:20:44.642 PM com.apple.xpc.launchd[1]: (ca.GoldCreekLtd.PMPractice.235232[972]) Service exited with abnormal code: 173
2016-05-05 4:20:45.545 PM sandboxd[144]: ([313]) storeassetd(313) deny file-read-data /dev
2016-05-05 4:20:50.133 PM sandboxd[144]: ([974]) mdworker(974) deny file-read-data /Library/Preferences/com.apple.security-common.plist (import fstype:hfs fsflag:480D000 flags:250000025E diag:0 isXCode:0 uti:com.apple.application-bundle plugin:/Library/Spotlight/Application.mdimporter - find suspect file using: sudo mdutil -t 154370416)[/quote]
So I will now dig into Sam’s suggestions.

Sam was spot on. In the receipt verification code I had the app’s bundle ID incorrect. DUH.

You can also get the message about the application being damaged and can’t be opened and to delete it and download it again if you haven’t filled in the appropriate parts of the iTunes Connect web site to specify the application as part of the submission process to the Mac App Store.