Player Can Make Purchases boolean block

iroosma

  • *
  • Posts: 97
My game is basically complete and I am now working on setting up IAPs.  One of the first things I do is check to see if the game is running on IOS.  Then I check to see if the player can make purchases.

I am using the boolean "Player Can Make Purchases" block.  So far, I can't get the "Player Can Make Purchases" block to ever return true.  See attached code image.

I have an active Apple developer license, IAPs are enabled for the app ID, and I am testing on an IOS device.

I'm sure it is simple, but would love some help.  Thank so much!

colburt187

  • *
  • Posts: 2249
Ive never used that block, not really sure what its purpose is. I think you want to request the info for all your product IDs in the first scene and not have it blocked by any bools.

iroosma

  • *
  • Posts: 97
Thanks for the response, colburt187.  Per your advice, I removed that block.

I can now successfully get to the "A product info request succeeds".  In that block, I compare the product ID with a text string of the product ID that is setup in iTunes Connect.  But the comparison never works.  Example, If product ID = TestIAP then <do something>.  That if condition never passes.

Is the product ID from the "A product info request succeeds" function just returning the product ID setup in iTunes Connect?

colburt187

  • *
  • Posts: 2249
What does the product ID block read out as if your draw it to the screen in a draw block?

iroosma

  • *
  • Posts: 97
It seems to be null.  If I draw the text or put it in a "Show alert with title" block.  It never displays anything.  I'm not why  a product info request succeeds but the product ID is empty.

colburt187

  • *
  • Posts: 2249
I've never used the product ID block unfortunately, I've only even done non consumable iaps, hopefully someone else can help.