Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Apple GameKit
Started by Michael W. Jun 24 2016 11:55 AM

26 replies to this topic
release ios
[TOPIC CONTROLS]
Page 1 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Michael W.

[GLOBAL: userInfoPane.html]
Michael W.
  • Contributor

  • 276 posts
  • Corona Staff

Apple GameKit

by Animonger


View and activate on the Corona Store


Full iOS GameKit Plugin for Corona SDK. This Corona GameKit library provides access to all of Apple’s iOS 7 Game Center features except voice chat. Games on iOS can take advantage of Game Center, Apple’s social gaming network. Game Center enables your users to track their best scores on a leaderboard, compare their achievements, invite friends to play a game, and start a multiplayer game through auto-matching.

Documentation

[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 3,934 posts
  • Enterprise

Sweet!  Good job Animonger!



[TOPIC: post.html]
#3

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,254 posts
  • Enterprise

Thanks man :)



[TOPIC: post.html]
#4

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

@roaminggamer, @scottrules44,

 

Thanks and you're welcome! I'm working on pushing the GKTester app Lua code to github now.


  • Danny likes this

[TOPIC: post.html]
#5

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

The GKTester app source is now up on github, which contains Lua code examples for iOS Game Center Achievements, Challenges, Leaderboards, Real-Time and Turn-Based Games.

 

How is this Corona SDK GameKit plugin different than the Corona SDK gameNetwork Apple Game Center plugin?

In short, it is updated to iOS 7 and it has more Apple Game Center features.



[TOPIC: post.html]
#6

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,254 posts
  • Enterprise

Check out this

https://youtu.be/eUVit54FGls

 

 

Project:https://github.com/scottrules44/gameKitTicTacToe


  • roaminggamer likes this

[TOPIC: post.html]
#7

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

Nice, and it's real-time game play!



[TOPIC: post.html]
#8

rich.stupek

[GLOBAL: userInfoPane.html]
rich.stupek
  • Enthusiast

  • 35 posts
  • Corona SDK

Do you support GKSavedGame with this plugin?



[TOPIC: post.html]
#9

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,254 posts
  • Enterprise

You could just use the iCloud plugin

[TOPIC: post.html]
#10

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

@rich.stupek,

No, GKSavedGame is available in iOS 8.0 and later. This plugin supports iOS 7 and earlier features only. When support for iOS 7 is no longer necessary, iOS 8.0 features will be added.



[TOPIC: post.html]
#11

Alan QuizTix

[GLOBAL: userInfoPane.html]
Alan QuizTix
  • Contributor

  • 798 posts
  • Enterprise

Is this plugin available anywhere for Enterprise users?



[TOPIC: post.html]
#12

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

Corona hasn't added it to the downloadable plugins bundle yet but you can download it from Bitbucket.



[TOPIC: post.html]
#13

Alan QuizTix

[GLOBAL: userInfoPane.html]
Alan QuizTix
  • Contributor

  • 798 posts
  • Enterprise

Thanks!



[TOPIC: post.html]
#14

Alan QuizTix

[GLOBAL: userInfoPane.html]
Alan QuizTix
  • Contributor

  • 798 posts
  • Enterprise

I'm sometimes having issues where calling:  

gameKit.show( "gameCenterSignInUI" ) 

doesn't seem to work. I've put a print immediately before I call it in my code, and the print shows up but nothing appears on screen.

 

This is on devices running iOS 10.1 and 9.3.5. Has anyone else seen the same thing? Is it some Apple thing where you can only show the popup a certain number of times?



[TOPIC: post.html]
#15

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

I just finished testing iOS 10.1.1 yesterday and it works fine.

 

What kind of event type are you getting in your callback when you call gameKit.init( onCallback )? "error", "showSignInUI" or "authenticated"?

 

Are you using test AppleID accounts?

 

Yes, Apple stops showing the Game Center sign-in screen If the user cancels it 3 times. You should get an error from the plugin if this is the case.

 

Below is sniped from this link

"Important: Game Kit handles opting out of Game Center across all games that support Game Center. If a player has already declined to create an account, when your game authenticates the player, it is told there is no authenticated player. The player never sees an authentication dialog. Because Game Kit handles this process across all games, your game should not include its own mechanism to disable Game Center authentication or ask a player’s permission to authenticate. Instead, your game should simply authenticate the player every time it launches and respond appropriately when authentication completes."



[TOPIC: post.html]
#16

Alan QuizTix

[GLOBAL: userInfoPane.html]
Alan QuizTix
  • Contributor

  • 798 posts
  • Enterprise

Ok, I think the 3 cancellations is probably the issue. However I don't get any callback at all if I call 

gameKit.show( "gameCenterSignInUI" ) 

after those 3 cancellations.

 

Here's what I've been testing:

 

On a fresh install, where there is no user currently signed in to Game Center on the device, I get the "showSignInUI" event type after calling init. We have a GameCenter button in our UI, if the user presses that after the "showSignInUI" event has been received I call:

gameKit.show( "gameCenterSignInUI" ) 

That works fine the first few times, but then after that it stops working completely, and with no callback so I can't even show an alert telling them to login via the settings app or something like that.



[TOPIC: post.html]
#17

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

The error would happen on the gameKit.init( onCallback ) callback. Instead of "showSignInUI" you should get an "error".

gameKit.show( "gameCenterSignInUI" ) only shows the UI view if one is available and nothing if the UI view isn't.



[TOPIC: post.html]
#18

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

Plugin Update: I just added Rob Miracle's feature request to get a player's alias and displayName with a playerID.

The new method is called Get Players With PlayerIDs



[TOPIC: post.html]
#19

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 20,423 posts
  • Corona Staff

Thank you!



[TOPIC: post.html]
#20

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

Unfortunately, the latest update introduced an arm64 compiler bug that I need to fix so in the mean time I've reverted back to the previous version. When I get this bug sorted I'll push the new feature again.



[TOPIC: post.html]
#21

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

Plugin Update: The arm64 compiler bug is solved and the new Players With PlayerIDs feature is now added to the plugin.



[TOPIC: post.html]
#22

bartz3

[GLOBAL: userInfoPane.html]
bartz3
  • Observer

  • 6 posts
  • Corona SDK

Hi Animonger,

 

   Thanks for creating a great plugin. I am having a issue with IOS 10 turn based game. Wanted to know the best way to debug this.

 

1. I installed the turn based game on 2 devices

2. Created all the appropriate iTunes connect record

3. When I create a match and invite the other player, it sends a message. When I click on the message nothing happens

 

I tried to create a auto match on the 2nd device and  then checked for existing matches on the first device and it doesn't show the match.. looks like the game center is not passing info from one device to another... 

 

I am lost debugging the issue. any pointers will be helpful.

 

Thanks,

Ram



[TOPIC: post.html]
#23

animonger

[GLOBAL: userInfoPane.html]
animonger
  • Contributor

  • 111 posts
  • Enterprise

@bartz3,

 

Assuming that everything is set up correctly on the Game Center side, it could be that Game Center is a bit flaky today. This happens occasionally and it can be madding for debugging. If Game Center is not working properly you'll just have to wait a couple of days but in the mean time double check that your iTunes is setup correctly:

Are you able login OK and to post a score to a Leaderboard?

Are you using test AppleIDs to login from your test devices?



[TOPIC: post.html]
#24

bartz3

[GLOBAL: userInfoPane.html]
bartz3
  • Observer

  • 6 posts
  • Corona SDK

Hi Thanks for responding. My game doesn't have leaderboard. but since you mentioned. I will add some test code and post to the leaderboard and see if that is working. 



[TOPIC: post.html]
#25

bartz3

[GLOBAL: userInfoPane.html]
bartz3
  • Observer

  • 6 posts
  • Corona SDK

Also, additionally when I create a game with auto player, I do get back from game center with game id etc.




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]



Also tagged with one or more of these keywords: release, ios