game-center

Gamecenter ios 9 GameCenter GKLocalPlayerListener methods not called

霸气de小男生 提交于 2019-11-27 04:40:44
问题 This is about GameCenter . Since "the GKLocalPlayerListener protocol inherits the methods from GKChallengeListener , GKInviteEventListener , and GKTurnBasedEventListener . In order to handle multiple events" and "do not implement GKChallengeListener , GKInviteEventListener , and GKTurnBasedEventListener directly; implement GKLocalPlayerListener instead. You can listen for, and handle multiple events using GKLocalPlayerListener " (these are from apple docs). One would expect that after

Game Center not authenticating using Swift

时间秒杀一切 提交于 2019-11-27 04:34:58
问题 I'm trying to authenticate the local player using swift, but every time I get a false value for the .authenticated property. Here is the code I'm using, it is called by the main view controller when the app starts. func authenticateLocalPlayer(){ var localPlayer = GKLocalPlayer() localPlayer.authenticateHandler = {(viewController, error) -> Void in if viewController { self.presentViewController(viewController, animated: true, completion: nil) }else{ println((GKLocalPlayer().authenticated)) }

How to authenticate the GKLocalPlayer on my 'third party server'?

寵の児 提交于 2019-11-27 03:46:46
iOS7 introduced new GKLocalPlayer method generateIdentityVerificationSignatureWithCompletionHandler() . Does anyone know how to use it for good? I assume there will be some public API at Apple server-side.. odyth Here is how you can authenticate using objective c. If you need it in another language should be trivial to translate. -(void)authenticate { __weak GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer]; localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error) { if(viewController) { [[[UIApplication sharedApplication] keyWindow].rootViewController

iOS Game Center: Scores not showing on leaderboard in sandbox

馋奶兔 提交于 2019-11-27 03:46:00
I'm developing a Game Center enabled game and I'm running into an issue in the sandbox environment. I can successfully report the score without error. However, when I show the leaderboard, there are no scores visible. To verify that the score actually got there, I query the local user's score with the following code: -(void)retrieveLocalScoreForCategory:(NSString *)category { GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init]; leaderboardRequest.category = category; [leaderboardRequest loadScoresWithCompletionHandler: ^(NSArray *scores,NSError *error) { [self

Game Center login dialog not shown again after cancelling it for the first time (iOS7)

霸气de小男生 提交于 2019-11-27 02:56:00
问题 I have a problem with logging a user to the Game Center. I first present the login dialog right after the application finishes loading. If the user cancels the dialog, I want to give him the option to change his mind by providing a login button in my main menu. However, on iPads with iOS7, the button doesn't do anything - the Game Center dialog doesn't get shown (it works correctly on iOS6). Instead, I immediately get the error "The requested operation has been cancelled or disabled by the

Unable to sign in Sandbox gamecenter on iOS 7

匆匆过客 提交于 2019-11-27 02:30:06
问题 Since iOS 7 I no longer get the prompt from game center to ask me to log in sandbox mode when I open my application. I searched for a while and never saw any known issues about this and there are no patch notes that says anything about sandbox mode changing. Has anyone encountered this problem? 回答1: If you've cancelled game center sign in enough times, the OS disables game center for that game. Prior to iOS7, you could manually sign in again using the game center app, and when you launch your

Game Center - Sending and receiving data

爷,独闯天下 提交于 2019-11-27 02:00:37
问题 EDIT: I have made a clean, new project, but still can't get it working. Please download it, there is a little code to look at and probably easy for a professional or anyone remotely experience to see whats I am doing wrong. Just trying to send that integer. http://www.2shared.com/file/fPOCLlg5/gkTest.html Hi I am trying to implement Game Center multiplayer in my iphone game and having trouble understanding the samples I have at hand in the Apple Docs and from third parties concerning sending

Game center login lock in landscape only in i OS 6

亡梦爱人 提交于 2019-11-27 01:20:14
问题 When Game center is loaded its default orientation is portrait. In order to lock it in landscape mode, added a category. @implementation GKMatchmakerViewController (LandscapeOnly) - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return ( interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); } -(NSUInteger)supportedInterfaceOrientations { return

Locking a UISearchBar to the top of a UITableView like Game Center

妖精的绣舞 提交于 2019-11-26 17:56:51
问题 There's this cool feature in the UITableViews in Game Center and the search bars they have at their tops. Unlike apps where the search bar is placed in the table header view (so it counts as a standard table cell), instead, it seems to be bolted to the parent navigation bar above it. So when scrolling the table, the search bar does indeed move, but if you scroll above the boundaries of the table, the search bar never stops touching the navigation bar. Does anyone know how this might have been

GameCenter authentication in landscape-only app throws UIApplicationInvalidInterfaceOrientation

自古美人都是妖i 提交于 2019-11-26 12:28:03
问题 Problem: If user is not logged into GameCenter account - GameCenter authentication view is launched in portrait mode (in ios 5 there were a modal dialog) asking to log in. But if I disable Portrait mode in xcode (Project Summary) or in supportedInterfaceOrientationsForWindow: (as my app supposed to run in landscape mode ONLY) I get: Terminating app due to uncaught exception \'UIApplicationInvalidInterfaceOrientation\', reason: \'Supported orientations has no common orientation with the