7

Everything was working perfectly under Mountain Lion. Mavericks, not so much.

The issue: I'm unable to carry out any receipt verification testing under Mavericks.

I'm using Receigen (Mac App Store/MAS) to generate both startup and in-app purchase receipt verification. I'm using Xcode 5.02 under Mavericks 10.9.

Here is the way it worked under Mountain Lion…

Archive the app and export it to an application. Make sure you are logged out of your personal MAS id. You'll use your iTunes Connect testing ID later. From the Finder, run your exported app.

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. This is expected. • 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 should prompt you for your MAS credentials. You will use your testing account here. • The system relaunches your application, and your application successfully validates the receipt.

This is what happens under Mavericks…

Same as above - archive/testing MAS ID/Finder run app.

However, now I receive this in the Console: Exited with code: 173 [this should be okay just like above] storeagent: Unsigned app (path/to/app).

???

No MAS credentials. Nothing. I've triple checked the code signing using both the Organizer/Validate as well as Receigen. Both tell me my app is signed properly with no issues.

Funny thing, I've submitted the app to the app store and after approval, it works. So it's signed correctly and receipt validation is working.

But, I'm unable to carry out any receipt verification testing. That's the issue.

Thanks for your time. Kevin

kupsand
  • 139
  • 2
  • 12
  • I have the same problem with Mavericks and can't seem to find a solution. The Receigen FAQ also doesn't list a solution. Try reaching out to their support. – bluebamboo Dec 12 '13 at 07:49
  • Same here, still looking for a solution… – Sergi Ramón Dec 19 '13 at 12:13
  • same here, totally go blind with IAP for the moment. – Jerry Tian Jan 06 '14 at 02:24
  • I tried the killall command as suggested by Wil Shipley but it didn't work for me. I still get the Unsigned App message after the exit 173. No MAS receipt is generated. Receigen also says my signature is valid when I click Validate Signature. Any other suggestions? Did you ever get this working @Shoes? – Tap Forms Jan 14 '14 at 04:20
  • @TapForms - I haven't gone back to try anything new. I was burned TOO many times with my customers having the app's IAP bite them. So I just left it. I need to get back to it and update the IAPs so I'll be working it using your answer below. Fingers crossed! Thanks – kupsand May 05 '14 at 20:13

4 Answers4

3

With the help of the Receigen author (Laurent Etiemble), executing the following commands helped me:

spctl -vvvvv --assess <YourApp>.app

For the app I submitted to Apple, I got the following message:

/Path/to/my/app/Tap Forms.app: rejected

To fix it, you need to do this:

spctl --add --requirement "anchor apple generic and certificate leaf[subject.CN] = \"3rd Party Mac Developer Application: <Your company name> (<Your organization ID>)\"" --label "MAS"

Then when you execute the spctl -vvvv --assess .app command, you get this:

/Path/to/my/app/Tap Forms.app: accepted
source=MAS
origin=3rd Party Mac Developer Application: <Your company name> (<Your organization ID>)

So now I've resubmitted my app and we'll see if it gets rejected for not being able to launch.

Tap Forms
  • 912
  • 8
  • 16
  • This did the trick for me, I was able to verify that receipt validation actually works. However, I have no idea if Apple sees it the same way when it comes to their review process. I guess I'll find out soon. FYI: Laurent Etiemble added a little additional info to his site about this: http://receigen.etiemble.com/guides-diagnostic.html – Martin Jan 20 '14 at 03:18
0

This does indeed appear to be a Mavericks bug.

Craig Hockenberry had the same problem on 10.9 (so did I) and his solution worked for me:

killall -KILL storeagent

See his blog.

Wil Shipley
  • 9,343
  • 35
  • 59
  • This solution didn't work for me. I still get the error Unsigned App after the exit 173. – Tap Forms Jan 14 '14 at 04:15
  • @Tap You have to launch from the Finder, can’t be inside Xcode / debugger / command line. – Wil Shipley Jan 14 '14 at 06:16
  • yes I was launching from the Finder. Still no go. Been hacking on this all day. I have an email into the Receigen developer so hopefully he'll have some suggestions too. Just keep getting that Unsigned App error. codesign says the app is signed correctly. – Tap Forms Jan 14 '14 at 07:47
0

Don't forget sudo:

sudo killall -KILL storeagent

This worked for me.

paxos
  • 877
  • 5
  • 11
0

My problem was that in Xcode I was signing the app with the "Mac Distribution" code signing identity and not the "3rd Party Mac Developer Application" one.

After changing the signing identity, I rebuilt the app, then deleted the app's container folder located in ~/Library/Containers/<The Apps Bundle ID>.

Then, double clicking on the rebuilt app in Finder, I was finally prompted to enter App Store credentials. I then entered the credentials of an iTunes Connect test user that I had setup, and the receipt was generated and the app launched ok.

Aidan
  • 5,346
  • 2
  • 19
  • 18