Hi everyone,
I am adding Game Center support and would like to leverage the listener to persist some local state around unlocked achievements if the game center call succeeds. This is to make sure that I don’t try to invoke the unlockAchievement a second time for the same achievement. The listener callback seems to be perfect for that, although for some reason it doesn’t get invoked.
This is the code I’m currently using:
local function requestCallback(event)
print "enter requestCallback"
if event.type == "unlockAchievement" then
if event.data then
--do good stuff
else
end
end
end
gameNetwork.request( "unlockAchievement",
{
achievement =
{
identifier="1489002",
showsCompletionBanner=true,
},
listener=requestCallback
})
It seems that the callback is never invoked. e.g. I don’t get the print message or popups, etc. that I put in the callback. Any ideas?
–wunderwuzzi [import]uid: 118947 topic_id: 21297 reply_id: 321297[/import]