Questions tagged [gamekit]

GameKit is an Apple Framework that provides classes to create social games.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Why does GKMatchmaking always find only the minimum number of players?

If three different devices try to find a match, then almost always only two users find a match, and the third one does not. I need that when searching for a match, all available players get there, not ...
Валерий's user avatar
0 votes
0 answers
28 views

How to hide the GCVirtualController

I have a virtual controller displayed in this way: let virtualConfiguration = GCVirtualController.Configuration() virtualConfiguration.elements = [GCInputLeftThumbstick, ...
jeremyjoron's user avatar
0 votes
1 answer
90 views

C++ error: no matching function for call to ‘Aws::S3::S3Client::S3Client(Aws::Auth::AWSCredentials

I am trying to install aws gamekit (https://github.com/aws/aws-gamekit/tree/main) on an Ubuntu machine. Have been modifying the code and installation steps where needed but can't seem to get past this....
RED's user avatar
  • 3
0 votes
0 answers
56 views

Is GKLocalPlayer's gamePlayerID different from the gamePlayerID other players in the GKMatch can access/see?

I'm trying to make a real-time peer-to-peer multiplayer game with GameKit/Game Center. I'm trying to store a dictionary of player IDs and scores ([String:Int]) to keep track of and share player scores ...
David's user avatar
  • 5
1 vote
0 answers
50 views

How to verify GameKit LocalPlayer auth signature on external server?

I am trying to implement the server-side auth verification for iOS GameKit client-side authenticated user as detailed here: https://developer.apple.com/documentation/gamekit/gklocalplayer/3516283-...
Santhosh Kumar's user avatar
0 votes
2 answers
63 views

GameKit achievement notifications not showing up even though they were working before?

Yesterday I got Game Center notifications working for my achievements, but as soon as I tried them again today they didn't work? All I did was re-organise the code, and the achievements are going ...
Ness Earthbound's user avatar
0 votes
0 answers
64 views

How to sign in a guest player in GameKit

I want users to still be able to play online when they don't feel like logging in using Game Center. This is how I thought it would work using an anonymous / guest player: GKLocalPlayer.local....
rayaantaneja's user avatar
  • 1,424
0 votes
1 answer
49 views

GameKit / GKMatchRequest: timeout or forced start?

I am using GKMatchmakerViewController to have the user auto match with players for my multiplayer game: if let matchmakerViewController = GKMatchmakerViewController(matchRequest: request) { ...
hotdogsoup.nl's user avatar
2 votes
0 answers
136 views

How to render a Swift component in ReactNative for Apple Game Kit

I'm trying to show the GameKit Leaderboards. Firstly I'm using React Native, but need to use the native modules from iOS to access the GK services, so I'm using swift. I have done the connection ...
asdkajd's user avatar
  • 31
0 votes
0 answers
105 views

GKGameCenterViewController showing as black text on dark background on iPads running iPadOS 16

I have a SwiftUI app that shows a GKGameCenterViewController. I am hitting a problem which is specific to iPads running iPadOS 16.1 and above in light mode only. Under these circumstances, the child ...
Benzy Neez's user avatar
  • 5,054
0 votes
1 answer
353 views

XCode build fail when add Apple.GameKit plugin for Unity: Undefined symbol

I have a Unity project, after setting up Apple.Gamekit plugin, it show up some error when build with XCode: ... ...
v1rus's user avatar
  • 1
0 votes
1 answer
144 views

How to show Gamekit add friend screen from Swiftui

How can the Game Center add friends screen be shown from SwiftUi? The UIViewController can't be passed in as shown below. Adding gamekit to project and authorization would also have to be done before ...
Ryan's user avatar
  • 650
1 vote
1 answer
141 views

How to set a host player for a peer to peer match in GameKit?

I have a GKMatch game with two players where I send data from one player to another with the match.send(). As I understand in a peer to peer match, without a server, one of the players would act as a ...
Astro's user avatar
  • 137
0 votes
1 answer
166 views

How to display a Game Center leaderboard in SpriteKit?

I'm pretty new to Swift and I'm having some trouble implementing a leaderboard into my game. So far, I'm able to authenticate local player and set up leaderboard in iTunes Connect. However, I'm unable ...
Sebastijan B.'s user avatar
0 votes
0 answers
64 views

GKTurnBasedEventListener method not called when using custom interface

According to the documentation, I should implement the GKTurnBasedEventListener protocol's player(_:receivedTurnEventFor:didBecomeActive:) method to receive turn-based event information. Although it's ...
West1's user avatar
  • 1,492
0 votes
1 answer
104 views

How to auto-match via GKTurnBasedMatch

I'm trying to implement a turn-based GameKit game using a custom user interface. Specifically, I'm trying to create a new match with auto-matched players. I've scoured the docs, but the only ...
West1's user avatar
  • 1,492
2 votes
1 answer
522 views

GKLocalPlayer localPlayer cannot authenticate: "this application is not recognised by Game Center" error GKServerStatusCode 5019

When authenticating the GKLocalPlayer.localPlayer with Game Center the console logs a message: _authenticateUsingAlert:Failed to authenticate player with existing credentials.Error: Error Domain=...
hotdogsoup.nl's user avatar
1 vote
0 answers
154 views

How do you issue a challenge to another player in Swift using GameKit?

I've been able to follow some of the limited guides here and on Apple's website to set up a leaderboard and achievements using Game Center / GameKit for Swift (iOS 15). However, I am now stuck in ...
FontFamily's user avatar
2 votes
1 answer
315 views

Can't connect players in GameKit using GKMatchmaker.shared().findMatch

I'm trying to connect two players with each other using GameKit in a very simple game. I want to use GKMatchmaker.shared().findMatch as I don't want to show any GameCenter related view controllers. (...
Stephan's user avatar
  • 1,831
0 votes
1 answer
28 views

GKTurnBasedMatch saveCurrentTurnWithMatchData returning an error on every other call

The player takes multiple actions before completing a turn. After each action, I call saveCurrentTurnWIthMatchData, with the match data updated. [gameMatch saveCurrentTurnWithMatchData: matchData ...
Giles N's user avatar
1 vote
2 answers
496 views

GCVirtualController - change element style and position for thumbsticks

I am working on a SwiftUI-based application that utilizes GCVirtualController to provide basic on-screen controls. While getting it set up has been relatively simple, I'm not particularly happy with ...
theficus's user avatar
3 votes
1 answer
353 views

GameKit presenting authentication view controller automatically instead of waiting for me to present it

According to Apple's documentation, you should set GKLocalPlayer.local.authenticateHandler, once at app launch, with a closure that accepts a viewController and an error. And if the viewController is ...
Hash88's user avatar
  • 692
0 votes
0 answers
56 views

How do I handle accepted multiplayer invites with Game Center's Fast Start in iOS?

I'm trying to implement the following Fast Start code shown during WWDC 2021 . // Set the GKMatch delegate and present your game scene when didFindMatch is called func matchmakerViewController(_ ...
tdevin's user avatar
  • 1
1 vote
2 answers
227 views

Gamekit / Gamecenter achievements not reporting correctly during testing

I am currently working on a Swift/SwiftUI game with GameCenter / Gamekit integration. I have successfully integrated game kit for leaderboards/scores, but I am having issues with achievements. At the ...
Daniel DE's user avatar
0 votes
0 answers
48 views

Datas not received with GameKit on swift

I'm currently making a multiplayer game with GameKit. I want to create a waiting viewController while each player receive the array of players and what they selected for their character. Here is my ...
Wattera's user avatar
  • 21
3 votes
0 answers
267 views

Trying to get GameKit matchMaking working

Swift 5.x iOS 14 Trying to Get GameKit Matchmaking, and almost there...but... my match seems to fail with this error message? Run GameKit on two real devices logged into different IDs. I get the ...
user3069232's user avatar
  • 8,717
1 vote
1 answer
284 views

GKSavedGame is not saved or loading back

I'm trying to save player game data using GKSavedGame from GameKit, but it doesn't work, and I don't get any error. (Is the data not saving? Is the data not loading back?) One of the problem is that ...
Nathan Fallet's user avatar
1 vote
1 answer
858 views

How to get the user's score from leaderboard? - Swift

I'm working on a game that messes with the leaderboard and the best player score. I would like that when he enters the app it synchronizes with his score saved in the leaderboard, but I didn't find ...
Gui Reis's user avatar
  • 446
1 vote
0 answers
47 views

Is there a way to make individual tiles of a Tilemap accessible and navigable with Voiceover in Swift?

I am a blind programmer, new to blindness but not to coding, and was wondering if anyone else has attempted this: I am trying to make a tile based movement system for a game and want to make each tile ...
Crimso's user avatar
  • 11
0 votes
1 answer
168 views

friend invitation with GKMatchmakerViewController never shows up

I basically just followed this tutorial https://www.raywenderlich.com/7544-game-center-for-ios-building-a-turn-based-gametried. Instead of a turned-based game, I was trying to make a peer-to-peer real-...
Yifan Zhang's user avatar
1 vote
0 answers
245 views

App Crashing GameCenterUI: specialized AccessPointRootViewController.supportedInterfaceOrientations.getter

I'm receiving a crash in my iOS game. This game utilizes GKAccessPoints and the Game Center UI's. I only noticed this crash in the released versions of my game (non-beta versions). The reason I think ...
Bhavin p's user avatar
  • 108
2 votes
0 answers
191 views

GameCenter Leaderboards not updating score

I am new to Swift (and coding in general) and have experienced an issue when uploading a score to the GameKit Leaderboard. I can see all users in the leaderboard, but the score is always "0"....
Smartie TV's user avatar
2 votes
2 answers
946 views

Unable to authenticate Local Player with GameKit (Game Center) on watchOS

I'm trying to integrate Game Center on a watchOS app but I'm unable to authenticate the Local Player. Maybe I'm missing any step to allow the companion watchOS app to access Game Center as the iOS app ...
Vicente Garcia's user avatar
1 vote
1 answer
41 views

How do I make the default value 0 with GameKit

let localPlayerScore = request.localPlayerScore ?? 0 The problem is that Swift is expecting the 0 to be of type GKScore. I get the following error: Cannot convert value of type 'Int' to expected ...
GettingStarted's user avatar
2 votes
0 answers
86 views

What exactly does resolveConflictingSavedGames in GameKit do?

According to the documentation, The GameKit function resolveConflictingSavedGames resolves conflicting saved games. However, I don't really understand what it does exactly, and how to use it. Does it ...
Viktor Sehr's user avatar
  • 12.9k
0 votes
2 answers
220 views

How to show a specific UIViewController when GKGameCenterViewController is dismissed?

I am presenting a GKGameCenterViewController in an SKScene that inherits from the following protocol. protocol GameCenter {} extension GameCenter where Self: SKScene { func goToLeaderboard() { ...
helloworld12345's user avatar
6 votes
1 answer
544 views

Mobile game, cross platform leaderboard / challenges

I am developing a small word game as a side project and chose Flutter to release the game for both Android and iOS. I am able to use flutter packages (e.g. https://pub.dev/packages/games_services) to ...
Nimo's user avatar
  • 71
0 votes
1 answer
52 views

How to have a texture-changing SpriteKit node?

I'm trying to figure out how to make a SpriteKit node have a randomised texture and for it to travel across the screen (Also to save the bag data but I'll add that later) I'm struggling on the texture ...
TrainNutter's user avatar
3 votes
2 answers
1k views

SwiftUI GKLeaderboard loadEntries

I would like to add leaderboards to my SwiftUI app. I can't find any examples of using loadEntries to load leaderboard values. I tried the following... let leaderBoard: GKLeaderboard = GKLeaderboard() ...
Peter F.'s user avatar
  • 186
2 votes
1 answer
780 views

GameKit: Connection to plugin interrupted while in use

I have been trying to solve the issue for a few weeks already. No response on the Apple Developers forum. No real help from the Apple Developer Technical Support. Given a high probability of the issue ...
Igor Tupitsyn's user avatar
0 votes
1 answer
27 views

iCloud GameKit 40 request / second limit questions

I'll be straightforward: What does it count as a "request" ? in some posts I've read a request is a "fetch", but on some others says 1 same operation of saving/updating might ...
pistoleta's user avatar
  • 131
0 votes
2 answers
148 views

Swift Array of Types element not recognised as type

I have the following implementation of some GKStates import GameplayKit.GKState class Running: GKState { let validNextStates: [GKState.Type] = [Paused.self, Over.self] override func ...
Sven Fritsch's user avatar
1 vote
1 answer
135 views

How to solve SpriteKit SKTexture's CGImage "Context leak"?

Xcode 11-12, MacOS Catalina, Swift 5 project... This code is produced "Context leak detected, msgtracer returned -1" error: import Foundation import SpriteKit import GameKit func ...
menangen's user avatar
  • 145
5 votes
2 answers
745 views

SwiftUI Game Center authentication doesn't prompt user to login

I have the below code to authenticate a local player in Game Center in my SwiftUI app. I want Game Center to prompt user to login if the player is not already login in but this doesn't happen. class ...
Heyman's user avatar
  • 489
3 votes
3 answers
3k views

Why am I getting Property with 'retain (or strong)' attribute must be of object type in GCDevice.h?

My code has always compiled correctly in Xcode versions prior to 12. Now that I'm trying to build in 12 I'm getting this error - which I know how to fix, except that it's in the CoreController header,...
headbanger's user avatar
  • 1,042
0 votes
1 answer
353 views

How do I force iCloud to sync data of an App on fresh install / first launch?

In a game I am working on I have implemented GKSavedGames and everything is working correctly except that if the game is uninstalled and reinstalled or installed on a new device the first initial ...
Paul Mathias's user avatar
0 votes
1 answer
127 views

Error when sending data between connected devices in Game Center

I am working on a local multiplayer, real time game in swift 5. In order to achieve the real time gameplay, I am sending data back and forth between two devices with the function GKMatch.sendData(data:...
Brian.Masse2's user avatar
-1 votes
1 answer
88 views

GKMartch.sendData method is obsoleted in iOS 14

I am working on a game that involves gameCenter and by extension sending data with Game Center. Before iOS 14 betas began coming out, the GKMatch sendData:toPlayers:dataMode:error: method worked great ...
Brian.Masse2's user avatar
1 vote
0 answers
62 views

Sending CGFloat and String Values with GKMatch.sendData(toAllPlayers: , with: .reliable)

I am making a real time multiplayer game with Game Center but have run into a road block. All I need to be able to do for this gamer to function is to send CGFloat and String values between the ...
Brian.Masse2's user avatar
0 votes
1 answer
122 views

matchmakerViewController:didFindMatch is not being called after accepting Invite

I am making a real time Game Center game, with GameKit as a new programmer, however I have run into a few road blocks. I am able to properly initialize the local player, present the matchmaking ...
Brian.Masse2's user avatar

1
2 3 4 5
18