game-center

How to open GameCenter in tvOS

Deadly 提交于 2019-12-09 12:58:13
问题 How can I open a game center leaderboard in tvOS? I've used this code for my iPhone games, 'leaderboardIdentifier' aren't available on tvOS. I've planned to use the same leaderboard on the AppleTV (it will be the same game). Many thanks for your help, Stefan @IBAction func handleGameCenter(sender: UIButton) { let gcViewController = GKGameCenterViewController() gcViewController.viewState = GKGameCenterViewControllerState.Leaderboards gcViewController.leaderboardIdentifier = gamePrefix +

Xcode 4.6 ARC Warning for Game Center Authentication

▼魔方 西西 提交于 2019-12-09 09:08:57
问题 This is a new compiler warning that only showed up when I updated XCode to 4.6. My code is lifted directly from Apple's documentation (this is my iOS 6 code btw). GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer]; localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error) { [self setLastError:error]; if(localPlayer.authenticated){ Warning--Capturing 'localPlayer' strongly in this block is likely to lead to a retain cycle 回答1: The issue is that the localPlayer

iPhone Simulator 6.0 not able to connect to gamecenter in sandbox mode

不想你离开。 提交于 2019-12-09 07:11:28
问题 I'm trying to implement a gamecenter aware app targeted to iOS 6. To give some info on the environment I'm working on mac os 10.7.5 with XCode version is 4.5.2 and xcode is running iphone and ipad simulator version 6.0. The problem is I cannot connect to gamecenter in sandbox mode neither through ipad or iphone simulator, but the same code works as desired while testing in my iphone. I followed the gamecenter programming guide in apple's developer library and I got this atm it is called from

when i update my game in iTunes connect will the leaderboards carry over?

╄→гoц情女王★ 提交于 2019-12-08 17:53:42
问题 if i update my game in iTunes connect will the leaderboards and achievements carry over. i have left everything related to game center the same in the new update but iTunes connect says "You don't have any new leaderboards for this app" just wondering if i need to make and integrate a new leaderboard for the update? 回答1: TLDR: Yes, they'll transfer. When you submit an update for your app, any existing leaderboards and achievements that have been approved in previous versions will carry over

MKMapView's user location is wrong on startup or resume

这一生的挚爱 提交于 2019-12-08 17:24:42
问题 When I start my application fresh, or resume after a long time, MKMapView's notion of the userLocation is wrong and shows me in the middle of the sea. I am using the following code: self.mapView.centerCoordinate = self.mapView.userLocation.location.coordinate; [mapView setCenterCoordinate:self.mapView.userLocation.location.coordinate zoomLevel:ZOOM_LEVEL animated:YES]; Happens after a lengthy resume of the app or brand new start.... 回答1: That's the expected behavior : the user location isn't

Error in iOS 6 after adding GameCenter to a landscape-only cocos2d app

泪湿孤枕 提交于 2019-12-08 07:45:01
问题 I'm having the issue described here: https://devforums.apple.com/thread/165384?tstart=0 Where my app crashes trying to load the GameCenter login screen because the screen is in portrait and my app only supports landscape. I've tried every solution described in the above thread, as well as all the solutions on the following thread: Crash on presenting UIImagePickerController under iOS 6.0 And here: http://www.cocos2d-iphone.org/forum/topic/36639 None of the solutions work. Either the crash

Unbalanced calls to begin/end appearance transitions for <GKModalRootViewController: 0xb7e450>

不想你离开。 提交于 2019-12-08 07:14:34
问题 I give up on that point, I just can't figure out what is wrong and where... Here is the problem: in my iPhone application using Cocos2d, I configured autorotation through a viewController; however, since, when Game center opens its view as the user taps on "Create new account" during the authentication, this view does not receive any touch, but the touch go to the game's view (which is hidden under the Game center view). I have tried everything I thought about, but since I did not find any

iOS - issue with rematchWithCompletionHandler in Sandbox

时间秒杀一切 提交于 2019-12-08 05:28:14
问题 I have the following code: if(tappedItem.match.status == GKTurnBasedMatchStatusEnded){ [[GameKitHelper sharedGameKitHelper] findMatchWithViewController:self delegate:self debug:false invite:tappedItem.player]; return; NSLog(@"Participants %@", [tappedItem.match.participants description]); [tappedItem.match rematchWithCompletionHandler:^(GKTurnBasedMatch *match, NSError *error) { if (error) { NSLog(@"%@", error); } else { [[GameKitHelper sharedGameKitHelper] setMatch:tappedItem.match]; [

Same Bundle ID suffix on iPad and iPhone versions of App

邮差的信 提交于 2019-12-08 04:06:05
问题 This is a subtle question. I am planning to release an iOS app with two versions - one for iPhone and iPod Touch, and the other for iPad. The apps will be named, say, MyApp and MyApp HD . The app allows you to save files, and also to communicate with other users of the app via GameCenter. I would like the iPad and iPhone versions to be able to interchange files, and also to communicate with each other via GameCenter. So, my question is, in iTunesConnect, should (and can I) assign both apps

GKTurnBasedEventHandler delegate is not receiving any messages

僤鯓⒐⒋嵵緔 提交于 2019-12-08 02:20:48
问题 I have used [[GKTurnBasedEventHandler sharedTurnBasedEventHandler] setDelegate:self]; but I am not receiving delegate calls. This was working at one point, and I can't figure out for the life of me what has changed. The app is properly badged (on the device home screen, it shows a badge with the number of games where it is my turn). Furthermore, using GKTurnBasedMatch loadMatchesWithCompletionHandler: is able to detect when it is the player's turn (or not). In fact, in every other conceivable