How can I use Game Center or the GameKit Framework with a Sprite Kit Xcode template? In Sprite kit, it uses Scenes; but normally to view the leaderboards for example you need to "presentModalViewController" but that is not possible in SKView.
Thanks in advance!
Smick pointed me in the right direction for a similar problem I was having. I needed to send a message to the main ViewController from my SKScene. This did it for me:
In your SKScene, import the ViewController
#import "MyViewController.h"
Then send it a message:
[(MyViewController *)self.view.window.rootViewController myMethod];
You could try creating a method in the ViewController that opens the GameKit view for you, that is triggered from the SKScene. Thanks Smick!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With