I have a question about Game Center: when you click on the Game Center button on the main menu, it opens the Achievements page on Game Center. You did that by adding the "Request achievements" with the Game Center plugin?
Because it doesn't work when I test it, maybe I have to publish it for it to work?
Hey DonRIF . I have a couple of parts to the GameCenter functionality.
First I make sure the player is logged in to GameCenter. I do this at the beginning when game is starting up (when the title screen is showing).
So the events are:
Browser is online
Trigger once > CordovaGame login
If the user is already logged in to GameCenter (in the device's settings), they will see a little 'welcome to GameCenter' banner appear in the game when the login action fires. If they are not logged in, a window will display requesting they log in.
Then for the menu button to call up achievements, I just check they are logged in and then use the action 'show achievements'.
So the events are:
On button touched
CordovaGame is logged in > CordovaGame Show Achievements
Im pretty sure you can test GameCenter functionality as an 'Internal Tester' in iTunesConnect.
By the way, I learned a lot from the examples posted by — If you havent already checked his example capx's then you want to grab them, they will definitely help you. In this case, if you look at the one called 'Cocoon Google Play Games (Cordova Game)' that should be useful. While AnreasR is interested more in Cocoon, you can still see how he sets up the capx and then just adapt it to work in XDK.
Andy's Freebies, Store Items, Giveaways and more!