IAP BADGER : loadProducts return nothing wheras isStoreAvailable is ok

Hi all, and Rob, and Simon :slight_smile:

I have some trouble to “contact” my IAP products from my ios store.

I have created 7 in-app purchases product in my ios store.

i correctly have coded the iap plugin, which star with :

 iap.init(iapOptions) 

then, later, the store is well opened because the following code works :

  if (iap.isStoreAvailable()) then            iap.loadProducts(loadProductsListener)   end

i just use the IAP BADGER code to show me which product i have in my ios store :

  local function loadProductsListener(raw, products)          --Debug table print function - this just prints the given table in a more human readable form     local function debugPrint ( t )             local print\_r\_cache={}             local function sub\_print\_r(t,indent)                     if (print\_r\_cache[tostring(t)]) then                             print(indent.."\*"..tostring(t))                     else                             print\_r\_cache[tostring(t)]=true                             if (type(t)=="table") then                                     for pos,val in pairs(t) do                                             if (type(val)=="table") then                                                     print(indent.."["..pos.."] =\> "..tostring(t).." {")                                                     sub\_print\_r(val,indent..string.rep(" ",string.len(pos)+8))                                                     print(indent..string.rep(" ",string.len(pos)+6).."}")                                             elseif (type(val)=="string") then                                                     print(indent.."["..pos..'] =\> "'..val..'"')                                             else                                                     print(indent.."["..pos.."] =\> "..tostring(val))                                             end                                     end                             else                                     print(indent..tostring(t))                             end                     end             end             if (type(t)=="table") then                     print(tostring(t).." {")                     sub\_print\_r(t,"  ")                     print("}")             else                     sub\_print\_r(t,"  ")             end             print()     end -- local function debugPrint ( t )       print "------------------------"       debugPrint(products)       print "------------------------" end

and the result on log at screen after 5 seconds, is :

------------------------ table : 0x121312313 { } FIRSTNAME-LASTNAME APPNAME[846] \<Notice\>: ------------------------

where FIRSTNAME and LASTNAME are mine, and APPNAME the name of my project.

and the table is empty…

So why is the table empty whereas i have created products in iTunes Connect, and that it seems it connect to the store ? … :frowning:

Any help would be appreciated

thanks a lot !

Hi there,

It sounds like the process for registering your products hasn’t been completed.

Have you followed all of the steps in the “Configuring an In-App Purchase Product” on the following page, all the way up to number 15?

https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/CreatingInAppPurchaseProducts.html#//apple_ref/doc/uid/TP40013727-CH3-SW1

Simon

Yes, all my products are in state “ready to launch”.

The only thing I see is that I haven’t fill the tax form already because I need to mail to us government to have a tax id number. But I don’t know if it unauthorized dev to works if your tax form is not already complete ?

Sorry for my English :slight_smile:

when i read :

Understanding Subscription Groups

When you configure your in-app purchase subscriptions in iTunes Connect, you’ll need to create at least one subscription group.

Subscription groups can consist of several in-app purchase subscriptions with varying levels and durations.

Does that mean that i have to create 7 groups for my 7 products ?

Is it mandatory ?

I haven’t create susbcription groups… i don’t see where it is on my itune platform. Do you know ?

No, i thinks it ts only when you have auto-renewable subscriptions products.

And my products are only consumable.

I don’t know where is the pb :frowning:

Hi again,

I’m not sure about the tax thing.

Just to clarify, are you saying your products are consumable IAPs or are they subscriptions?

Simon

only : consumable IAPs

and the result on log at screen after 5 seconds, is :

------------------------ table : 0x121312313 { } FIRSTNAME-LASTNAME APPNAME[846] <Notice>: ------------------------

where FIRSTNAME and LASTNAME are mine, and APPNAME the name of my project.

and the table is empty…

What does this main : FIRSTNAME-LASTNAME APPNAME[846] <Notice>: ?

What is this numer [846] ?

Note that he changes when i rebuilt… now it is 995 …

someone seems having the same pb :

https://stackoverflow.com/questions/11423988/testing-in-app-purchase-issues-iap-ios

and the result is :

5 down vote accepted

I have went through this guide:

https://developer.apple.com/library/ios/#technotes/tn2259/_index.html

In my case this is was related that I have not got Banking Information. If you want to test your IAP you must have an iOS Paid Applications contract (iOS) with a your tax information.

So i have to wait 1 month to receive my tax number from US…

Okay - at least you know what the problem is (even if there is a frustrating wait involved…)

Simon

Maybe that in a couple of days my banking information will be updated and it will be fine