[SOLVED] SDKBOX IAP Products size is 0

I have integrated the SDKBOX In-App plugin in my Cocos2D-X game. When I try to fetch the in-app product list, the console of XCode shows the error:

IAP :WARNING!, Products size is 0

I verified that the bundle ID of the game is same as mentioned on the iTunes Connect account. I also verified the product ids for all the IAP items.

Currently, I am trying to test the build with sandbox tester account. The build shows the above error after I deploy the game on real device from XCode.

I have following questions:

  1. What other problems can cause this error? And how to fix them?
  2. I think I can test the IAP items using sandbox tester account or am I missing something here?

I would appreciate any suggestions and thoughts on this topic.

EDIT:
Currently, the status of IAP items is “Missing metadata” on iTunes Connect. I am trying to test the IAP items with sandbox test account.

SOLUTION:

After adding prices for all the IAP items on iTunes Connect, the issue was resolved.

did u check this sdkbox_config.json ?

Thank you for the reply. Yes, I did check the sdkbox_config.json file. I have added the product ids of the IAP items in the config file. When I call IAP::refresh() function, the plugin is able to fetch the items’ product ids from the config file. But the plugin is not able to fetch the Title, Description of the IAP items.

how do you check it?

When we call the IAP::refresh() function, “onProductRequestSuccess” function receives the details of IAP items.

Our example:

IAP: ========= IAP Item =========
IAP: Name: coin_package
IAP: ID: com.sdkbox.com1
IAP: Title: Coin Package
IAP: Desc: Coin Package
IAP: Price: CNÂĄ6.00
IAP: Price Value: 6.000000
IAP: Currency: CNY
IAP: ========= IAP Item =========
IAP: Name: coin_package2
IAP: ID: com.cocos2dx.plugintest3
IAP: Title: 
IAP: Desc: 
IAP: Price: 
IAP: Price Value: 0.000000
IAP: Currency: 
IAP: ========= IAP Item =========
IAP: Name: double_coin
IAP: ID: com.cocos2dx.non2
IAP: Title: 
IAP: Desc: 
IAP: Price: 
IAP: Price Value: 0.000000
IAP: Currency: 
IAP: ========= IAP Item =========
IAP: Name: remove_ads
IAP: ID: com.sdkbox.non1
IAP: Title: Remove Ads
IAP: Desc: Remove Ads
IAP: Price: CNÂĄ6.00
IAP: Price Value: 6.000000
IAP: Currency: CNY

the com.cocos2dx.plugintest3 and com.cocos2dx.non2 no title and desc, because there are wrong product id. plz check your id again.
Thanks,

I checked the IDs mentioned in the config file with iTunes Connect IAP setup and they are matching. However, I have product in the format “com.companyname.gamename.itemname”. Can this format cause this problem?

Currently, the status of IAP items is “Missing metadata” on iTunes Connect. I am trying to test the IAP items with sandbox test account.

Most likely your iTunesConnect configuration is not complete.

I have the same problem with you. And I’ve already added the prices. I don’t know why~

How about your bank info.

1 Like

Thanks a lot!
I used a new Apple account to publish my app. So that I didn’t set up the bank info…
After my bank info has been approved, the IAP function works well~