game-center

GameCenter login alert

懵懂的女人 提交于 2019-12-03 06:08:07
问题 In a game I am developing using GameCenter, I want to handle the following scenario: the user starts up the game. He is shown the system alert that prompts him to log on GameCenter. He ignores it for now. after a while, the user wants to log in to GameCenter and clicks on(for instance) the Leaderboards menu item. He choses cancel instead of Log in, for now. the process repeats several times. Eventually the user DOES want to log in to GameCenter. He clicks the Leaderboard menu item one more

“This game is not recognized by game center.” iPhone Development

雨燕双飞 提交于 2019-12-03 05:56:37
There are already a couple of questions on this but I followed their steps to solve it and it doesn't seem to work for me. Here's what I have done: 1. I double checked to have the bundle identifier in the xcode project to be the exact same as the provisioning profile found on the provisioning portal (it also says Game Center is enabled). No wildcards. 2. I have logged in using a sandboxed account to gamecenter (made 2 accounts incase one wasn't sandbox). I did see the word "sandbox" with some numbers/letters on the top left while signing up for an account, so I'm 100% sure I have a sandboxed

iOS Development: When receiving a Game Center invite, how do I obtain the GKMatch object?

佐手、 提交于 2019-12-03 03:47:50
I'm building an iPhone game that uses Game Center and I'm having a hard time understanding how to start a match game that was started by receiving an invitation to play from a friend. The docs say this... The acceptedInvite parameter is non-nil when the application receives an invitation directly from another player. In this situation, the other player’s application has already created the match request, so this copy of your application does not need to create one. According to this, I don't need to create a match request since the player who did the inviting already created one. If so, how do

Removing a GKTurnBasedMatch which is in an invalid state

六眼飞鱼酱① 提交于 2019-12-03 02:56:36
I am doing some experimentation to try to learn about GameKit and I made a simple game and an interface which lists my player's matches. I am trying to add the ability to remove games using the removeWithCompletionHandler: method on the match, but I am having trouble removing a GKTurnBasedMatch which seems to have entered an invalid state. A po of the match in question prints: $0 = 0x1d590d20 <GKTurnBasedMatch 0x1d590d20 id:858d8257-cc49-4060-b1d8-38c09a929e3c status:Ended message: taken:2013-03-08 18:08:47 +0000 created:2013-03-08 03:24:14 +0000 current:<GKTurnBasedParticipant 0x1d58c020 - id

GameCenter login alert

烈酒焚心 提交于 2019-12-02 19:36:36
In a game I am developing using GameCenter, I want to handle the following scenario: the user starts up the game. He is shown the system alert that prompts him to log on GameCenter. He ignores it for now. after a while, the user wants to log in to GameCenter and clicks on(for instance) the Leaderboards menu item. He choses cancel instead of Log in, for now. the process repeats several times. Eventually the user DOES want to log in to GameCenter. He clicks the Leaderboard menu item one more time. In my tests, I have found that the alert popup raised by the call to

Button Animate like ios game center button

廉价感情. 提交于 2019-12-02 17:21:44
I am trying to make my buttons animate like buttons in ios game center. they seem to wobble and float about the screen like a bubble. I've tried moving my buttons randomly on the screen, make them move in a constant cirular path at the same time but it's not the same effect. I need a wobble kind of effect. any ideas are appreciated Combining a few CAKeyframeAnimations will give you the result. You need one for the position to follow a circle, and one for each scale (x/y) which are timed a bit different to achieve the wobble-effect. Check out the example: UIView * view = [[UIView alloc]

Send NSString via Game Center

≡放荡痞女 提交于 2019-12-02 10:03:01
I want to send NSString form another one to another one iPhone/iPad via Gamecenter but it crash with EXC_BAD_ACCESS here in .h file typedef enum { kMessageTypeRandomNumber = 0, kMessageTypeGameBegin, kMessageTypeSubmit, kMessageTypeExchange, kMessageTypePickup, kMessageTypePass, kMessageTypeGameOver } MessageType; typedef struct { MessageType messageType; } Message; typedef struct { Message message; NSString *submitTile; } MessageSubmit; and here in .m file - (void)sendData:(NSData *)data { NSError *error; BOOL success = [[GCHelper sharedInstance].match sendDataToAllPlayers:data withDataMode

GameCenter: endTurnWithNextParticipants not advancing

时间秒杀一切 提交于 2019-12-02 08:26:55
In the sandbox environment, I'm having trouble advancing a turnbased match to the next player. Initial conditions: Player A and Player B on Device A and Device B, respectively. Both logged into the sandbox Both players can see each other's GC status message Player A creates a match and invites player B Player A ends the turn In my "end turn" function I do the following: NSLog(@"size = %ld", updatedMatchData.length); //move the current player to the bottom of the list NSMutableArray *nextPlayers = (NSMutableArray *)theMatch.participants; NSLog(@"%@", [nextPlayers description]);

What is the proper way to do GameCenter authentication?

淺唱寂寞╮ 提交于 2019-12-02 04:46:14
问题 I have seen in posts around stack overflow that shows snippets of handling GameCenter authentication. However, none of these solutions address any of the problems that real world use cases cover. Namely, the [GKLocalPlayer localPlayer].authenticateHandler is just a call back of the status, and not much else. It provides a view controller, but there are massive inconsistencies in .authenticated, and error states. There are a few things I am trying to do: 1. Not pop up the game center login

Game Center Friend List

穿精又带淫゛_ 提交于 2019-12-02 02:20:29
问题 All I made a game for the Apple iOS. Now I would like to show my friend list in Apple's Game Center. How can I show the Game Center friend list of a logged in player on an iPhone, possibly using the UIViewController (which manages the ViewControllers)? Any help would be appreciated.. Thanks... 回答1: To show your Game center friends in your app you can use the below code given. -(void) retrieveFriends { GKLocalPlayer *lp = [GKLocalPlayer localPlayer]; if (lp.authenticated) { [lp