I’m having a tough time with store.loadProducts. I’m sending it a list of two items, one valid and one fake. The “before” and “after” messages print out, but none of the messages within the callback are displaying, not even the “entered” and “leaving” messages.
I’m using the code below, adapted from http://docs.coronalabs.com/api/library/store/loadProducts.html (“dprint” is just a function to print to the device display).
I thought it might be because I was using a Development provisioning certificate, so I created an Ad Hoc certificate and built with that, but the results are the same. Any ideas?
[lua] dprint(“Before loadProducts”)
local listOfProducts = {“com.unterra.enneaglyphs.lockbutton”, “lockbutton”}
local function productCallback( event )
dprint(“Entered callback”)
dprint(“showing valid products” … #event.products)
for i=1, #event.products do
dprint(event.products[i].title) – This is a string.
dprint(event.products[i].description) – This is a string.
dprint(event.products[i].price) – This is a number.
dprint(event.products[i].localizedPrice) – This is a string.
dprint(event.products[i].productIdentifier) – This is a string.
end
dprint(“showing invalidProducts” … #event.invalidProducts)
for i=1, #event.invalidProducts do
dprint(event.invalidProducts[i])
end
dprint(“Leaving callback”)
end
store.loadProducts( listOfProducts, productCallback )
dprint(“After loadProducts”)[/lua]
[import]uid: 117162 topic_id: 29919 reply_id: 329919[/import]