Game Center unlockAchievement callback not invoked

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
        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
                })

[removed]

views:1042 update:2012/2/7 8:40:54
corona forums © 2003-2011