GameCenter integration problem

I am stuck at the very beginning of the Game Center integration.

I am using the code from the tutorial to init the game center.

local function onSystemEvent( event )  
 if( event.type == "applicationExit" ) then   
 elseif event.type == "applicationStart" then  
 gameNetwork.init( "gamecenter", initCallback )  
 end  
end  
  
function initCallback( event )  
 if event.data then  
 loggedIntoGC = true  
 native.showAlert( "Success!", "User has logged into Game Center", { "OK" } )  
 else  
 loggedIntoGC = false  
 native.showAlert( "Fail", "User is not logged into Game Center", { "OK" } )  
 end  
end  

It always gives me the “User is not logged into Game Center” alert and then crashes (the game just disappears).

Any help would really be appreciated.

Regards,
Damir. [import]uid: 108334 topic_id: 35370 reply_id: 335370[/import]

I can point you toward some good code, created by Glitch Games, who was kind enough to share several good modules of code specific to such things as GameCenter, Facebook etc… If you check the forums as well as the code exchange section for GGGameCentre.lua. He has a lot of methods you can use to likely solve the issue. He also has a readme file for most of these modules he shares that explains things fairly well.

Hope that helps. [import]uid: 148857 topic_id: 35370 reply_id: 140587[/import]

I can point you toward some good code, created by Glitch Games, who was kind enough to share several good modules of code specific to such things as GameCenter, Facebook etc… If you check the forums as well as the code exchange section for GGGameCentre.lua. He has a lot of methods you can use to likely solve the issue. He also has a readme file for most of these modules he shares that explains things fairly well.

Hope that helps. [import]uid: 148857 topic_id: 35370 reply_id: 140587[/import]