IAP not displaying product items but doesn't give error (SOLVED)

Not sure why this code is not listing the items. It doesn’t give an error but doesn’t show any items. Error does return nil. I have changed the ID just to post on the forum only.

local REMOVE_ADS_ID = "com.removed.game.noads"

local function iap_callback(self, products, error)
	if error == nil then
		print("Listing products")
		for i,p in pairs(products) do
			print(i)
            print(p.title)
            print(p.description)
        end
    else
		print(error.error)
    end
end

local function iap_init(self)
	iap.list({ REMOVE_ADS_ID }, iap_callback)
end

The code looks good. Double check in iTunes Connect that the product is properly set up. Also double check the Apple ID on the device and that it’s added to iTunes Connect as a test account (sandbox).

I completed the paid agreements in itunes connect and now it is working. Odd I guess Apple requires this before you can test iaps.

It is working now so all is good.

1 Like