Hey, @selim.anac, I don’t know the answer to your specific question, but here’s what I do. It’s my workaround:
-
I don’t initialize OF in main.lua when user launches my game the first time.
-
I have a button in my menu screen that accesses the OF, which initializes OF and shows the OF dashboard and asks the user if he/she wants to sign in. For this to work, all I did was to implement OF. I posted a help to the community about how to go about implementing it (and wow, I’m so thankful that we have such a helpful people on forum): https://developer.anscamobile.com/forum/2011/12/05/help-open-feint-game-center
-
What helped me most to get the OF working was the first reply post by Burhan:
https://developer.anscamobile.com/forum/2011/12/05/help-open-feint-game-center#comment-71742
Following the instruction step-by-step described in the article, it didn’t take long to get it to work. Like the article suggests, setting up OF account takes much much longer than anything else. Coding bit is rather very simple thanks to the gameNetwork API that Corona provides.
-
Going back to step #2 above, once a user access that screen, I save a user data (which is a simple three state flag). When the flag says that user has accessed OF button at least once and activated OF before, the next time the user launches my game, I initialize OF from the main.lua file. I figured if a user accessed the OF screen from menu screen, chances are, this user has an OF account, or at least, interested in using OF at some point. Also, initializing OF doesn’t open up the dashboard, so it won’t bother the user at all (even if he/she doesn’t want to sign in). And again, at this stage, I use the same flag for my game to know that the OF is initialized.
-
When the user accesses OF from menu screen, it knows whether or not the OF is already initialized, and if it is already initialized, it will simply trigger the show function. (i.e., If the flag says it has not initialized OF, then it will initialize first.)
This seems to work fine for me so far. And for saving the flag/data, I use Ice Library. It does the wonders for me. You can find it here: http://developer.anscamobile.com/code/ice
I hope this helps.
Naomi
[import]uid: 67217 topic_id: 18851 reply_id: 72958[/import]