IAP Nightmare - What in Heaven's Name am I doing wrong?

Hey everyone,

I have scoured every single forum post I can get my hands on trying to figure out this In App Purchase thing.  At this point all I am trying to do is get the In App Purchase demo to show something other than a Native Alert Box, “In App purchases are not allowed on this device.”

Here’s what I have done so far, based on what I have read on other forum posts:

  1. Deleted all Certificates and made them brand new (I have used xCode as well as doing it manually)

  2. Made a New App Id - making sure to NOT have it be a Wildcard.

  3. Made brand new Development Provisioning Profile, linking to the correct App ID and Development Certificate.  Also tried this using an Ad Hoc build.

  4. Completely Erased and Reset my Phone.

  5. Made multiple Test User Accounts.

  6. Signed out of App Store on Device.  Making sure NOT to sign in to the App Store using the Test User account via the App Store Log In as I know this will negate the Test User account.

  7. Set up an In App Purchase in iTunes Connect, using both the full name as com.tizzylabs.zigzag.buyfullgame  as well as just zigzagbuyfullgame

  8. Made the code in the demo project (for the Lemonade stand) use the full name as stated above, and also in other attempts have used just the shortened name as stated above.

  9. Using the Daily Build 2014.2189

  10. Mac with Mavericks installed xCode 5.1

  11. Other than changing the 3 placeholders for the in app id’s, I have left the In App Demo file exactly as it was, no other changes have been made to that code.  I tried it with leaving the original app id’ sin place that ship with that main.lua file, however after reading other forum posts, I assume that it will not work as it is written (verses Android which does work straight out of the box).

  12. I have also gotten the code from http://coronalabs.com/blog/2013/09/03/tutorial-understanding-in-app-purchases/  and again went through all the steps listed above, and all I get with that is Transaction failed errors.

So since the demo file works on Android, I assume that this is a Provisioning issue.  There must be something that I am doing incorrectly that would make this work.

Any help would be greatly appreciated.  :-)

Thanks in advance,

Ed

Ok I figured it out.  I have been beating my head against the wall for like 4 days on this so to have this thing actually work is extremely gratifying. :slight_smile:  Hopefully this will help someone else out in the future as well.

So the deal was it all came down to the Provisioning File I was using.  For all of my other apps in the past, I have basically just made a single Development Provisioning File with an App Id (totally not anything to do with the current game at hand - in fact the app ID was something like com.tizzylabs.coronadevelopment ) and just reuse that over and over again.  And that has always worked fine for all of my previous app development in the past until now.

But if you want to do in apps, you have to use the same App ID that you will use for the Distribution Provisioning File.  

So my game had com.tizzylabs.ziggyzaggy for the App ID.  And I had to use that for the Development Provisioning file as well as the Distribution Provisioning File.  Once I did that it worked like a charm.

Sitting on this side of the fence now, it does of course make total sense why that would be completely necessary and I feel a bit sheepish that I didn’t think of this waaaay earlier.  I mean how ELSE is it going to know where to go get the in app information from???  But when you are so used to doing things a certain way, and you all of a sudden run into a brick wall, it’s hard to think outside of the box to get to a good solution. :slight_smile:

The end.

Ok I figured it out.  I have been beating my head against the wall for like 4 days on this so to have this thing actually work is extremely gratifying. :slight_smile:  Hopefully this will help someone else out in the future as well.

So the deal was it all came down to the Provisioning File I was using.  For all of my other apps in the past, I have basically just made a single Development Provisioning File with an App Id (totally not anything to do with the current game at hand - in fact the app ID was something like com.tizzylabs.coronadevelopment ) and just reuse that over and over again.  And that has always worked fine for all of my previous app development in the past until now.

But if you want to do in apps, you have to use the same App ID that you will use for the Distribution Provisioning File.  

So my game had com.tizzylabs.ziggyzaggy for the App ID.  And I had to use that for the Development Provisioning file as well as the Distribution Provisioning File.  Once I did that it worked like a charm.

Sitting on this side of the fence now, it does of course make total sense why that would be completely necessary and I feel a bit sheepish that I didn’t think of this waaaay earlier.  I mean how ELSE is it going to know where to go get the in app information from???  But when you are so used to doing things a certain way, and you all of a sudden run into a brick wall, it’s hard to think outside of the box to get to a good solution. :slight_smile:

The end.