Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Gamekit doesn't answer — Gideros Forum

Gamekit doesn't answer

unlyingunlying Guru
edited February 2014 in General questions
Hello.
In my game i require "gamecenter" does nothing. I can't understand why it's happen. Is there any possibility to know what happens on gamekit:authenticate()?
gamecenter is enabled for this app.

Comments

  • ar2rsawseenar2rsawseen Maintainer
    edited February 2014
    require "gamekit"
     
    function onAuthenticateComplete(event)
       if event.errorCode ~= nil then
          print("error while authentication: "..event.errorDescription)
       else
          print("authentication successful. now loading friends...")
    	  print(event.localPlayer.playerID)
       end
    end
     
    gamekit:addEventListener("authenticateComplete", onAuthenticateComplete)
     
    gamekit:authenticate()
    I just noticed, there is no Gamekit in the docs, oops, will fix that ;)
  • I have this code. But how to see these prints?
  • OZAppsOZApps Guru
    Accepted Answer
    @unlying, if you are running the app/player on your device connected to a Mac, you can see these in the Console or on the XCode Devices console.

    What I found works is post that to a website, like logging but to a website so that you can pick it up from there. Alternatively you can also set up alerts using
    function alert(theMessage)
     local aD = AlertDialog.new("ALERT", theMessage or "Alert", "OK")
     aD:show()
    end
    and instead of print, you can call
    alert("error while auth: " .. event.errorDescription)
    , you get the idea.
    twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
    Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
    Cool Vizify Profile at https://www.vizify.com/oz-apps
  • @OZApps, thanks. Alerts was a great idea.
    I have message "the requested operation has been cancelled or disabled by user".
    After googling, i loggedin in gamecenter throught settings. Game start to fall because of somewhat string expected. Then i logged out in settings and game let me sign-in in a game with gamecenter. And now it works ok, shows me leaderboard and report score. So everything works. Looks like just another bug in XCode...

    Thanks!
Sign In or Register to comment.