gamekit

Handle invitation to GKTurnBasedMatch without game center view controllers

ぐ巨炮叔叔 提交于 2019-12-04 08:18:53
I am working on a simple turn-based word game, and I'm having a difficult time figuring out how invitations are working. When user A invites user B to a game, I want user B to be able to see this game in my custom match interface (ie a screen where all of user B's games are listed). Things are fine if user B clicks on the notification when he is invited to a game, but I still want the game to be visible through my own interface if user B just navigates to the app on his own. Whenever this match interface screen appears, I am using [GKTurnBasedMatch loadMatchesWithCompletionHandler:] to get all

Inviting a Game Center friend to a match programmatically

♀尐吖头ヾ 提交于 2019-12-04 03:26:14
Does GameKit allow you to invite a specific Game Center friend to a match, programmatically, i.e. without presenting the GC ViewController? The following handleInviteFromGameCenter documentation seems to imply that you can populate GKMatchRequest.playersToInvite and use it with [GKTurnBasedMatch findMatchForRequest]: When your delegate receives this message, your application should create a new GKMatchRequest object and assign the playersToInvite parameter to the match request’s playersToInvite property. Then, your application can either call the GKTurnBasedMatch class method

Sandbox Game Center Turn Event Notifications Not Consistent

时间秒杀一切 提交于 2019-12-03 16:30:14
I'm making a turn-based game, using the Game Center Turn-Based Gaming functionality. I'm using the simulator and my iPhone to test notifications of turn events. The results are very inconsistent. About 75% of the time when I make a move on the simulator and pass the turn I don't get any notifications on my iPhone. It seems that this function doesn't get called: handleTurnEventForMatch:didBecomeActive: I set the GKEventHandlerDelegate in the code that authenticates the local user and it seems to be set correctly. The fact that I get notifications once in a while suggests that this isn't where

iPhone: Sending large data with Game Kit

对着背影说爱祢 提交于 2019-12-03 15:55:22
I am trying to write an app that exchanges data with other iPhones running the app through the Game Kit framework. The iPhones discover each other and connect fine, but the problems happens when I send the data. I know the iPhones are connected properly because when I serialize an NSString and send it through the connection it comes out on the other end fine. But when I try to archive a larger object (using NSKeyedArchiver) I get the error message "AGPSessionBroadcast failed (801c0001)". I am assuming this is because the data I am sending is too large (my files are about 500k in size, Apple

iOS Development: Strange problem with authenticating Game Center user

ぃ、小莉子 提交于 2019-12-03 15:43:24
问题 I'm building an iPhone game that supports Game Center (GC). When the app launches, I try to authenticate the local player... if([GKLocalPlayer localPlayer].authenticated == NO) { [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) { [self callDelegateOnMainThread: @selector(processGameCenterAuth:) withArg: NULL error: error]; }]; } Everything seemed to be working well. If the user wasn't signed into GC when the app launched, the app would display a dialog box

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

只谈情不闲聊 提交于 2019-12-03 15:01:19
问题 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

PAN with Linux, iOS, Bluetooth, Bonjour, GameKit — Possible?

倖福魔咒の 提交于 2019-12-03 14:04:59
问题 So I read different takes on this matter (I think I read all the related questions on SO). Can I connect in a PAN - Can I write an app that will connect - my linux machine and my iOS device via bluetooth? Using or not using Bonjour or GameKit. Few requisites: iOS devices are not jailbroken. iOS devices may or may not have the hotspot/tethering feature enabled (which as far as I have gathered is dictated by the Broadband provider -- i.e. if you pay you can tether your connection). iOS can run

Removing a GKTurnBasedMatch which is in an invalid state

牧云@^-^@ 提交于 2019-12-03 11:30:39
问题 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

iOS Game Center GameKit Programmatic Invite Matchmaking

半腔热情 提交于 2019-12-03 09:53:52
问题 I'm trying to implement a real-time multiplayer game with a custom UI (no GKMatchMakerViewController). I'm using startBrowsingForNearbyPlayersWithReachableHandler: ^(NSString *playerID, BOOL reachable) to find a local player, and then initiating a match request with the GKMatchmaker singleton (which I have already initiated). Here's where I'm having trouble. When I send a request, the completion handler fires almost immediately, without an error, and the match it returns has an expected

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