Can't create a development receipt

Following: ValidateLocally


The relevant bit is:

Test During the Development Process

In order to test your main application during the development process, you need a valid receipt so that your application launches. To set this up, do the following:

  1. Make sure you have Internet access so you can connect to Apple’s servers.
  2. Launch your application by double-clicking on it (or in some way cause Launch Services to launch it).

After you launch your application, the following occurs:

  • Your application fails to validate its receipt because there is no receipt present, and it exits with a status of 173.
  • The system interprets the exit status and attempts to obtain a valid receipt. Assuming your application signing certificate is valid, the system installs a valid receipt for the application. The system may prompt you for your iTunes credentials.
  • The system relaunches your application, and your application successfully validates the receipt.

With this development receipt installed, you can launch your application by any method—for example, with gdb or the Xcode debugger


Indeed attempting to run yields a prompt for my iTunes credentials by showing a dialog containing this text:

'XYZ.app we purchase using the App Store on another computer. To use 'XYZ.app. on this computer, sign in using the Apple Id and password used to purchase it.'


When I enter my developer credentials I get a dialog containing this text:

'Unexpected error occurred while signing in. The AppleID you entered could not be found or your password was incorrect. Please try again. [OK]


Keychain shows the following certificates as non-expired and valid:

MacDevelopment; MacAppDistribution; MacInstallerDistribution; DeveloperIDApplication; DeveloperIDInstaller

I can also upload a validated version of the app to iTunes Connect.

Steves-iMac:Debug steve$ codesign --display --verbose=4 XYZ.app
Executable=/Users/steve/Library/Developer/Xcode/DerivedData/ABC-drvtlxucbknrmnccbltstxjkmmoj/Build/Products/Debug/XYZ.app/Contents/MacOS/XYZ
Identifier=com.[someIdentifier]
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=37777 flags=0x0(none) hashes=1173+5 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha1=aac606f550e345d1cbe3c34995c15ebc5811dde2
CandidateCDHash sha256=2e865f94d48627446f679f9c960830ee51d4dff6
Hash choices=sha1,sha256
CDHash=2e865f94d48627446f679f9c960830ee51d4dff6
Signature size=4683
Authority=Mac Developer: Steve SomeName (T[someid])
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Signed Time=Aug 4, 2016, 12:01:10 PM
Info.plist entries=30
TeamIdentifier=[someIdentifier]
Sealed Resources version=2 rules=12 files=79
Internal requirements count=1 size=176

Steves-iMac:Debug steve$ codesign --verify --verbose XYZ.app
XYZ.app: valid on disk
XYZ.app: satisfies its Designated Requirement
Steves-iMac:Debug steve$


Below is Console during a double-click launch of the Debug product from Finder.


So what I am I not seeing here in this pocess?

Thanks for any help here!

Steve



8/4/16 2:11:00.984 PM taskgated-helper[3039]: Starting taskgated-helper
8/4/16 2:11:01.040 PM taskgated-helper[3039]: validated embedded provisioning profile: file:///Users/steve/Library/Developer/Xcode/DerivedData/123-drvtlxucbknrmnccbltstxjkmmoj/Build/Products/Debug/XYZ.app/Contents/embedded.provisionprofile
8/4/16 2:11:01.040 PM taskgated-helper[3039]: Found 2 provisioning profiles
8/4/16 2:11:01.040 PM taskgated-helper[3039]: allowing entitlement(s) for pid=3038 due to provisioning profile
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.mapdb
8/4/16 2:11:01.088 PM storelegacy[645]: LaunchServices: received XPC_ERROR_CONNECTION_INVALID trying to map database
8/4/16 2:11:01.088 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.mapdb
8/4/16 2:11:01.088 PM storelegacy[645]: LaunchServices: received XPC_ERROR_CONNECTION_INVALID trying to map database
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.089 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.089 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.089 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.089 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.090 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.090 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.090 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.091 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.091 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.091 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.092 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.092 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.092 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.093 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.093 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.093 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.094 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.094 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.094 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.094 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.095 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.095 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.095 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.096 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.096 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storelegacy(645) deny(1) mach-lookup com.apple.***.modifydb
8/4/16 2:11:01.096 PM storelegacy[645]: LaunchServices: disconnect event received for service com.apple.***.modifydb
8/4/16 2:11:01.000 PM kernel[0]: Sandbox: storeassetd(508) deny(1) file-read-data /dev
8/4/16 2:11:08.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:08.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup com.apple.pbs.fetch_services
8/4/16 2:11:09.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:10.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:11.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:14.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:15.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:26.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:26.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:27.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:32.000 PM kernel[0]: Sandbox: storeuid(1366) deny(1) mach-lookup Multilingual (Apple)_OpenStep
8/4/16 2:11:32.733 PM akd[534]: success
8/4/16 2:11:33.363 PM akd[534]: success
8/4/16 2:11:33.763 PM accountsd[507]: AIDA Notification plugin running

I'm seeing the exact same problem, running Xcode Version 8.0 (8A218a).


Background:

  • I've been updating an old project to use the latest settings, and wanted to move to in-app purchasing, hence wanting to be able to validate the receipt.
  • However starting an entirely new project and doing all the settings as recommended by the validate locally article results in exactly the same error.
  • I did change my apple ID email address recently.


One weird thing which I don't know whether it's related or not, or if it's even a problem, but my understanding was that Xcode creates a developer profile automatically for you and then uploads this to developer.apple.com, but I can't see the automatically created profile in https://developer.apple.com/account/mac/profile/, which I was expecting. This along with the error message suggests that Xcode is failing in some way to connect to / authenticate with Apple's servers, but that's just a guess.


@SteveC did you make any progress with this?

Can't create a development receipt
 
 
Q