gameNetwork.init help!

When I call gameNetwork.init for openfeint I get a quick flash of a screen, coming up from the bottom of the app and then it disappears. It’s so fast I can’t even tell what it is, it kind of looks like an openfeint screen. So no openfeint login screen or anything, but the app doesn’t crash. Any ideas?

My app is all setup in openfeint with leaderboards and achievements, plus I have my plist file in place for Game Center. I have not clicked “Enable IOS App” in Openfeint, I did not think I needed to do that until I was done testing, but could that be it?

I’m using:
Corona Version 2011.591 (2011.8.2)
building for iPhone running iOS 4.2.10
with Xcode 4.1

Thanks for any help or suggestions!

[import]uid: 8139 topic_id: 15288 reply_id: 315288[/import]

No, you don’t need to submit/enable it until it’s fully done.

I’ve built recently with OF and haven’t had any similar issues myself. (I’m running the same version of Corona as you, too.)

Maybe try running it in the Xcode simulator to see if the log reveals any clues?

I’d double check your code too, just to ensure you are initiating OpenFeint at the right time and only once, and not doing anything else at the same time, (scene change, etc). [import]uid: 52491 topic_id: 15288 reply_id: 56488[/import]

OK Peach thanks for the help. I know I was writing some prefs, but pretty sure no scene changes, I’ll double check. So just to get this straight, I call gameNetwork.init once and only once, every time the app starts?

What about on resuming the App like if you tell the app not to quit on exit in build settings?

Thanks!
[import]uid: 8139 topic_id: 15288 reply_id: 56536[/import]

Also, make sure to pass your IDs as strings into the init() function or else it will fail. [import]uid: 32256 topic_id: 15288 reply_id: 56540[/import]

OK Peach I found the problem! It’s a weird one, but I isolated it to an alert box I was using, kind of like my own welcome screen introducing online gaming with GC and OF. If the user chose to participate, I then proceeded to do the initialization and write some prefs. The weird thing is that it was the alert box that was screwing up the OF screen. When I chose not to use a native alert box but instead wrote my own with two ui buttons everything worked fine. Strange huh?

Anyway, I now have a new problem I was hoping you could help with. The very first time I saw the GC sign in screen in my app, it said “sandbox” which was what I was expecting. I chose not to sign in and the app responded with “Game Center Disabled, sign in through GC”. So here’s the problem, no matter how many times I delete the app and re-install and init OF for the first time I never see that sandbox login screen anymore, it’s like it ignores GC. What do you think about that? How do I get the GC sandbox login screen back in my app?

Thanks!

p.s. i should clarify this a bit: I see the OF screen, I click “do not want these awesome features”, and then nothing. The first time I did it, after the OF screen it gave me the GF screen. [import]uid: 8139 topic_id: 15288 reply_id: 56617[/import]

I’m glad you got it solved although your new issue is obviously no good either.

I recall having a similar issue myself some time back and I think solved it by signing out of GameCenter on my device then signing in again as a different user. (You can create test user accounts in iTunes Connect.)

Could you give that a go and let me know if it then signs you in/attempts to sign you in/gives you the sandbox thingy-majiggy?

I have had apps not give me the sandbox login and simply sign me in, which was odd but never caused issues.

Anyway - let me know.

Peach :slight_smile: [import]uid: 52491 topic_id: 15288 reply_id: 56635[/import]

kRona,

If you don’t mind, can you give us a small main.lua that reproduces this issue please and then send it to us? You can send us attachments via bug reports. Please see the “Report a Bug” link at the top of this page.

Thanks! [import]uid: 32256 topic_id: 15288 reply_id: 56710[/import]

Hi Joshua,

Sure no problem, but do you mean the problem where the native alert box wipes out the OF login or the one where I am no longer seeing the sandbox sign in screen for GC request?

[import]uid: 8139 topic_id: 15288 reply_id: 56780[/import]

I’m referring to the Alert Box. That sounded like really bad behavior that we need to address. If you think the Game Center issue is a separate issue, and you can easily reproduce it, then by all means report that to us as a separate bug too. Thanks! [import]uid: 32256 topic_id: 15288 reply_id: 56784[/import]