Game center Integration

I have an app that supports open feint. I wanted to also integrate ga center so i did this:

  1. Make leader boards and achievements on iTunes connect
  2. add the OFGameCenter.plist that i got from open feint ( and edit it)
  3. download the newest daily build

It still doesn’t work.

Do I need to initialize open feint somehow?

PS: i used the openfeint api for open feint, not gameNetwork [import]uid: 130035 topic_id: 23335 reply_id: 323335[/import]

That is an older method of doing things; in newest build you’d initiate gamecenter and openfeint using new methods, gameNetwork API. [import]uid: 52491 topic_id: 23335 reply_id: 93457[/import]

So you’re saying what I have to do is initialize both open feint and game center using gameNetwork, and then enter all of the leader boards twice?

Could you give me an example of how to do it in the flowing function
[lua]local function test (event)
if score == 20 then
– submit the value to leaderbord in open feint – submit the value to leaderbord in game center end
end[/lua]

or is there an easier way. [import]uid: 130035 topic_id: 23335 reply_id: 93464[/import]

There are samples already in the CoronaSDK folder on your computer :slight_smile:

Go CoronaSDK > SampleCode > GameNetwork [import]uid: 52491 topic_id: 23335 reply_id: 93488[/import]

I understand how to do them separately, but I am not sure how to do the together. [import]uid: 130035 topic_id: 23335 reply_id: 93540[/import]

refer to this blog
http://blog.anscamobile.com/2012/01/tutorial-game-center-integration-ios/

Basically you just need to submit score/achievement to Openfeint

If you set up correctly Openfeint will submit the score to Gamecenter for you.
[import]uid: 49513 topic_id: 23335 reply_id: 93577[/import]

I tried that and its still not working.

Would someone please just explain to me step by step what I have to do to enable game center if I have open feint with open feint api? [import]uid: 130035 topic_id: 23335 reply_id: 93833[/import]

Never mind, I got it.

But a couple of questions came up:

  1. How do I enable GC if the user has declined the open feint request?
  2. If GC works through OF how do i make buttons for GC leader boards and achievements? [import]uid: 130035 topic_id: 23335 reply_id: 93877[/import]
  1. if declined then cannot access both Openfeint and GC. Users can have either openfeint only or openfeint + GC, but cannot have GC without openfeint.

  2. You cant. Unless you use standalone GC.

Previous I use the following code so when user clicked the GC button, it jumps out of the game, go to the Game Center app.

gcUrl = "gamecenter:"  
function gamecenter\_f (event)  
 if ( event.phase == "ended" ) then  
 system.openURL(gcUrl)  
 end  
 return true  
end  

[import]uid: 49513 topic_id: 23335 reply_id: 93890[/import]

I read somewhere that if the user can’t use GC without OF, then the app will be rejected.

and i know that method, but I wanted it to open in the app, like it would if it was GC only. [import]uid: 130035 topic_id: 23335 reply_id: 93892[/import]

My previous 4 apps approved without any problem. I have GC button with the gcUrl = “gamecenter:” method.

2. You cant. Unless you use standalone GC. [import]uid: 49513 topic_id: 23335 reply_id: 93896[/import]

Okay then, I will use gcUrl = “gamecenter:”

And Im testing my app right now, and the highscores are showing up in OF, but not showing up in GC. the GC also says ***sandbox***. when I sign into my GC account when the app first launches.

Do you know how to fix that?

Ro is it just because my app hasn’t been released yet? [import]uid: 130035 topic_id: 23335 reply_id: 93910[/import]