Create apps that allow players to interact with each other using GameKit.

Posts under GameKit tag

83 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Unity Apple Plugin GameKit Error 37 when sending build to app review
I'm using the Apple Unity Plugins to use Game Center to authenticate Playfab accounts for my game and when I test this on testflight, everything works fine for me and the people I've tested with, however, when I send the build to review, they are getting GameKitException 37 which states "This game is not listed in a marketplace that supports Game Center" and upon further research I found this page https://developer.apple.com/documentation/gamekit/gkerror/code/appunlisted which I'm assuming is the same thing. This seems to suggest that I need my app to be listed on the App Store which is strange because this has created a what comes first, the chicken or the egg problem. I need to pass review to get the game listed in the App Store and they can't test the game because accounts cannot be authenticated with Game Center which apparently needs to be listed on the App Store. So far, I can't find the reason why this doesn't happen on testflight and only happens when I send it to review. I opened a ticket to Apple Developer Support and haven't recieved a response. I asked app review about it and they replied "Hello, Thank you for your response. Since all apps must pass App Review before they can be approved, it should not be necessary to have a "store page". We look forward to reviewing your app once all issues have been addressed and the new build has been received and queued for review. Best regards, App Review" Which doesn't really help me. I am quite pressed for time and I really need assistance in resolving this issue which I cannot replicate. Has anyone encountered this issue or know how to solve it?
1
1
216
1w
Game Center leaderboard works on TestFlight not on live app
I have a VisionOS app that uses a Game Center Leaderboard. On 'appear' of my content view, I check authentication, and if the user is auth'd, I display a 'leaderboard' button. This works on development / TestFlight – the little floating 'Game Center logged-in' pop up shows up when the app runs, and the button appears. Tapping the button opens the leaderboard, and I can tap over to 'global' and see everyone's scores. However, the app launched today on the App Store, and I'm having some issues. The leaderboard button isn't showing up, meaning that the auth call is probably failing silently. Not sure why. If I log out of Game Center on the device, and re-open the app, I'm able to auth and see my leaderboard button. Once I've done that, the leaderboard seems busted. On App Store Connect I can see the values that I expect (high scores from my beta test flight). But, on the production app, the leaderboard is just empty. And there's no 'global' tab to tap on. Wondering if this is a propagation issue? Like, does it take time to roll out the Game Center entitlements when the app is live? I'm going to distribute promo codes to try and get some more people with the App Store version testing for me to see what happens for them. Any help appreciated!
0
1
162
1w
Unity GameCenter Leaderboard issue
Hey, i have created a game in unity with the apple core and apple gamekit plugins present. I setup 5 leaderboards on the app store connect. I made a unity build and did the whole testflight build loop to test everything. When i open my gamecenter panel via the button i see my leaderboards but they show as MISSING TITLE which is weird because i have for sure set them up correctly they have a leaderboard reference name and leaderboard id as well. When debugging i can see that when i call my submit score function it gets submitted with no error but then i also dont see the score appear anywhere . Keep in mind the leaderboards are not live and are being tested on testflight first
1
0
168
1w
iPhone and iPad Collaboration
Hello, I'm building apps for iPhone and iPad. Those are working together like a 2-screen Nintendo switch. Is there any way for communication between iPhone and iPad without an outside server? PAN(personal area network) could be a solution, but I could not find any information to use it for my case. If the iPad is connected to iPhone as a personal hotspot (though there's no cell tower), they should be communicate each other. I think there's a better way for my case. Could anyone can tell me where I start to looking for? Thanks, JJ
1
0
145
1w
No Apple plug-in library path found
Hey! I'm facing a problem I have 0 idea how to solve it. I'm building a project with Unity 2022.3.21 for visionOS and after a lot of exhausting problems I'm having the last one, I am kinda new to Xcode. I get the error "No Apple plug-in library path found", at the root of the project there Xcode should find the ApplePluginLibraries folder, and it's actually there with two folders inside Apple.Core and Apple.GameKit. Xcode is saying the path was not found and I can see it exists through finder. In Search Paths > Framework Search Paths I have: $(PROJECT_DIR)/ApplePluginLibraries/Apple.GameKit $(PROJECT_DIR)/ApplePluginLibraries/Apple.Core Also in Other Linker Flags I have: -L$(PROJECT_DIR)/ApplePluginLibraries/Apple.GameKit -L$(PROJECT_DIR)/ApplePluginLibraries/Apple.Core I was having a few errors and the last one is: Command PhaseScriptExecution failed with a nonzero exit code, and the description says about the path not found. My info: MacOS: Apple M1 Pro Sonoma 14.5 Xcode: 15.4 Unity: 2022.3.21f1 Any idea? Thanks!!
0
1
106
1w
Error: apple/apple/game-porting-toolkit 1.1 did not build
I was trying update gptk, so i removed the old one ( installed by Xcode 15.0 ) and reinstalled it, but accuired a issue: Error: apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/wine64-build If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core): apple/apple Error: Your Xcode (15.0) is outdated. Please update to Xcode 15.4 (or delete it). Xcode can be updated from the App Store. So I upgrade the Xcode to 15.4 by app store and still encountered: Error: apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/CASEM/Library/Logs/Homebrew/game-porting-toolkit/wine64-build If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core): apple/apple I've been reading some post says use 15.1, but still get same error report. What should I do next? Any help woulbe appreciated.
0
0
315
2w
Game Center fetchSavedGames sometimes returns empty list of games, although it works correctly on the next tries
I have implemented the Game Center for authentication and saving player's game data. Both authentication and saving player's data works correctly all the time, but there is a problem with fetching and loading the data. The game works like this: At the startup, I start the authentication After the player successfully logs in, I start loading the player's data by calling fetchSavedGames method If a game data exists for the player, I receive a list of SavedGame object containing the player's data The problem is that after I uninstall the game and install it again, sometimes the SavedGame list is empty(step 3). But if I don't uninstall the game and reopen the game, this process works fine. Here's the complete code of Game Center implementation: class GameCenterHandler { public func signIn() { GKLocalPlayer.local.authenticateHandler = { viewController, error in if let viewController = viewController { viewController.present(viewController, animated: false) return } if error != nil { // Player could not be authenticated. // Disable Game Center in the game. return } // Auth successfull self.load(filename: "TestFileName") } } public func save(filename: String, data: String) { if GKLocalPlayer.local.isAuthenticated { GKLocalPlayer.local.saveGameData(Data(data.utf8), withName: filename) { savedGame, error in if savedGame != nil { // Data saved successfully } if error != nil { // Error in saving game data! } } } else { // Error in saving game data! User is not authenticated" } } public func load(filename: String) { if GKLocalPlayer.local.isAuthenticated { GKLocalPlayer.local.fetchSavedGames { games, error in if let game = games?.first(where: {$0.name == filename}){ game.loadData { data, error in if data != nil { // Data loaded successfully } if error != nil { // Error in loading game data! } } } else { // Error in loading game data! Filename not found } } } else { // Error in loading game data! User is not authenticated } } } I have also added Game Center and iCloud capabilities in xcode. Also in the iCloud section, I selected the iCloud Documents and added a container. I found a simillar question here but it doesn't make things clearer.
0
0
223
May ’24
fail install game porting toolkit
when i install game porting toolkit 1.1 ,i got an error as below: Error: Failure while executing; patch -g 0 -f -p0 exited with 2 ==> Installing game-porting-toolkit from apple/apple ==> Staging /Users/***/Library/Caches/Homebrew/downloads/bf215bb93a68251243c69e19a3ba0d670aa82daad63a2bfe24d7ff0a11c2c969--crossover-sources-24.0.2.tar.gz in /private/tmp/game-porting-toolkit-20240520-35139-asrgp4 ==> Patching Error: Failure while executing; patch -g 0 -f -p0 exited with 2. Here's the output: patching file 'wine/include/distversion.h' patching file 'wine/configure guys who knows how to fix it?
0
0
243
May ’24
GameKit leaderboard image fails to load
I've added a recurring leaderboard in App Store Connect which I can get the localized title from, submit scores to, and load players from, but I'm getting an error whenever I try loading the image for it with the instance method for GKLeaderboard, loadImage(). The description from the error is: The requested operation could not be completed due to an error communicating with the server. Both the completion block and async versions of this method yield the same result. I made sure the image is a PNG in 1024x1024, 72 DPI, and in the RGB colorspace. No errors appear after I upload the image. Are there any hidden requirements that might be causing this error? Perhaps there is a waiting period before the server can provide the image?
1
0
283
May ’24
GKTurnBasedMatchmakerViewController disabled "Send Game" when recipients are set
When I run the following code, the Matchmaker view is populated with me (local player) and my opponent (correct picture and friendly name). however, the "Send Game" button is disabled. I assume that recipients is set correctly. There are errors from loadPlayersForIdentifiers . GKMatchRequest *request = [[GKMatchRequest alloc] init]; request.minPlayers = 2; request.maxPlayers = 2; request.defaultNumberOfPlayers = 2; request.inviteMessage = @"Testing"; [GKPlayer loadPlayersForIdentifiers:@[ playerID ] withCompletionHandler:^(NSArray<GKPlayer *> *_Nullable players, NSError *_Nullable error) { if (error) { NSLog(@"Error loading player: %@", error); } else if (players.count > 0) { request.recipients = players; GKTurnBasedMatchmakerViewController *mmvc = [[GKTurnBasedMatchmakerViewController alloc] initWithMatchRequest:request]; mmvc.turnBasedMatchmakerDelegate = self; mmvc.showExistingMatches = NO; [self presentViewController:mmvc animated:YES completion:nil]; } }]; If I remove the opponent, and then re-add them manually, the "Send Game" button is enabled.
0
0
232
Apr ’24
Complete Beginner - Any help is greatly appreciated
Hello everyone, So I will start off by saying I am a very amateur developer with some experience in C++ mostly. Over the summer I want to build an app similar to a board game and launch it on the App Store for me and my friends to play when we don't have the game's physical board. Basically, there would be one person who hosts a "game" while everyone else joins through a code or something like that (maybe there's an easier way if you know everyone would be playing in person with each other). Once a game begins I want cards to show up on peoples's screens and that's it, no fancy graphics or anything like that. So, to the root of my issue. I am brand new to Swift and Xcode. I began googling and tinkering with it and made a little app where a user can add names and then pick letters from the names to display (very very basic stuff). I also figured out how to import and manipulate images a little bit. My question is about the process of making a game, connecting it to GameKit/Game Center, and then how to actually launch it on the App Store so my friends can also download it. If anyone has any resources they particularly found useful when starting out using Swift, please let me know. I really really don't like reading straight from the documentation (although who does honestly). Anything helps!! Thank you!
1
0
272
Apr ’24
UIBezierPath’s orientToPath
Here is a link to a super long conversation with a true genius at StackOverflow https://stackoverflow.com/questions/78343630/what-algorithm-is-available-to-correlate-a-skspritenodes-position-with-the-uibe/78379892#78379892 He has done an extraordinary amount of work to make up for what I consider is the non-working of UIBezierPath’s orientToPath = true. He’s done multiple hours work to make up for orientToPath = true not working. What are we missing?
0
0
265
Apr ’24
apple/apple/game-porting-toolkit 1.1 did not build
My MacBook Pro is M3 max, running macOS 14.4.1 (23E224), with Xcode 15.3 and Command_Line_Tools_for_Xcode_15.3 installed. When I tried to execute "brew -v install apple/apple/game-porting-toolkit", it reported the following error. Error: apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/yuanmouren/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/yuanmouren/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/yuanmouren/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/yuanmouren/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/yuanmouren/Library/Logs/Homebrew/game-porting-toolkit/wine64-build If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core): apple/apple I found the following error reasons in the console. /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:629:11: error: unknown type name 'SecTrustSettingsDomain' const SecTrustSettingsDomain domains[] = { ^ /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:630:9: error: use of undeclared identifier 'kSecTrustSettingsDomainSystem' kSecTrustSettingsDomainSystem, ^ /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:631:9: error: use of undeclared identifier 'kSecTrustSettingsDomainAdmin' kSecTrustSettingsDomainAdmin, ^ /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:632:9: error: use of undeclared identifier 'kSecTrustSettingsDomainUser' kSecTrustSettingsDomainUser ^ /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:640:18: warning: this function declaration is not a prototype [-Wstrict-prototypes] status = SecTrustSettingsCopyCertificates(domains[domain], &certs); ^ /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:641:23: error: use of undeclared identifier 'noErr' if (status == noErr) ^ /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:647:31: warning: this function declaration is not a prototype [-Wstrict-prototypes] if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr) ^ /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:647:51: error: use of undeclared identifier 'kSecFormatX509Cert' if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr) ^ /private/tmp/game-porting-toolkit-20240414-2133-st99bv/wine/dlls/crypt32/unixlib.c:647:95: error: use of undeclared identifier 'noErr' if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr) ^ 2 warnings and 7 errors generated. make: *** [dlls/crypt32/unixlib.o] Error 1 make: *** Waiting for unfinished jobs.... How should I resolve this issue?
4
1
1.9k
Apr ’24
GameKit authentication not working on Intel based devices
Hello, As stated in the title, we implemented the GameKit unity package. We did a lot of testing and never encountered any issue related to the authentication until now, andwe identified that the device with the issue was Intel. The configurations and provisioning profile used are correctly set. I was wondering if any of you encountered this issue or had an idea how to debug this? Thanks!
0
1
386
Apr ’24
NSOutlineView leaks lots of NSTableRowView objects
I have a two-level view-based NSOutlineView, employing a data-source and delegate. It is not populated by binding. My code is all ObjC, and my problem persist since MacOS 10.11 to the current MacOS 14.4.x Because of some specific visual issue, I use a very simple subclass of NSTableRowView, which has only this: @implementation MYRowView - (void)drawRect:(NSRect)dirtyRect { self.emphasized = NO; // this affects the complicated color scheme for selection - will not use the "alternateColor" for drawing, but rather the "secondary color" - who knows what it is. This way our texts and icons and progress do NOT disappear on selected rows. [super drawRect:dirtyRect]; } @end And then later, in my NSOutlineView delegate: -(NSTableRowView *)outlineView:(NSOutlineView *)outlineView rowViewForItem:(id)item { return [OITRowView new]; } There are, other more complicated @interface OITOutlineCellView : NSTableCellView That I makeViewWithIdentifier:owner: and populate in response to NSOutlineView - (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item { Now I noticed that after adding several items (top level) with some thousands sub-level items to my outline-view, and then REMOVING them and reloading all data - my app's memory is ever increasing When I used the memory graph feature in Xcode debugger - I found a huge number (actually identical to the maximum number of rows) - all of the class MYRowView. Interestingly enough - none of my cell-views remained in memory. Now I verified - my data source reported zero items, the UI looks empty, and all functions as expected - except for this "leak" of MYRowView objects. As you can see in the code (copied exactly from my app) I only create them - and return them to the OS - I never hold any reference to these objects. So.... What Am I doing wrong, and what can I do to alleviate the issue?? The methods [NSOutlineView reloadItem:reloadChildren:] and [NSTableView reloadData] are documented to "release all related views" -- but obviously they DONT. my app gets to ~300 MB (started at 20MB) with about 7500 rows Idea anyone? What to check? what to try?
1
0
306
Apr ’24