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

Posts under GameKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

I delete Gaming Port Kit and want to redownload it again, than it happened.
I've installed the GPTK before, but it pops up with some problems so I want to reinstall it again. So I deleted home brew and redownload all the materials I needed. But when it comes to install the game-porting-toolkit formula, I can't download it, did anyone have the same problem with me? jimmy@Jimmymbp14 ~ % brew -v install apple/apple/game-porting-toolkit Error: Formulae found in multiple taps: * apple/apple/game-porting-toolkit-compiler * gcenx/apple/game-porting-toolkit-compiler Please use the fully-qualified name (e.g. apple/apple/game-porting-toolkit-compiler) to refer to a specific formula. jimmy@Jimmymbp14 ~ %
0
0
1.4k
Mar ’24
USB HID Specifics for Mac OS?
I am currently developing an USB HID Device, specifically a type of Joystick. However it seems that any attempt of getting a joystick to work on Mac do not work. My prototype works perfectly on Windows, being recognised as such and receiving all data. On MacOS, the Joystick is not recognised as a Joystick though, and the OS does not seem to receiver any Input from it whatsoever. I have translated my code to use both Mouse and Keyboard, both work perfectly. I have also tried to have the Joystick identify as a Gamepad, but again, it works on Windows and is not recognised on Mac (is not recognised as a Gamepad). Are there any specific restrictions to HID devices on MacOS? Apple developer only seems to describe specifics from a software standpoint, not from the standpoint of someone developing hardware. And even then it only seems to describe very specific HID devices, such as mouse, keyboard or a stylus. Please also keep in mind that I don't have much experience developing MacOS applications.
2
0
3k
Mar ’24
NSMutableDictionary removeAllObjects does not free up used memory!
I have a custom Objective-C ObjectCache class that utilized NSMutableDictionary to store named objects (specifically large NSImage objects). The class has a maxItems property and clear method, which worked fine. - (void)clear { @synchronized(_cache) { [_cache removeAllObjects]; } } But yesterday I received a customer feedback complaining one of my app consumes up to 24GB memory. I verified that on my M1 Mac mini, and it's true. Even after calling clear method, memory usage shown in both Xcode debugger panel and Activity Monitor remains the same. It did work before. Once I close a picture gallery window by calling clear method, memory usage dropped immediately as shown in Activity Monitor. I suspect that this is a bug in ARM architecture. Does anyone else have same problem?
1
0
1.1k
Mar ’24
Using video chat instead of voice chat on online game ?
Hello, I am building an app that requires players joined to an online game session and to have a video chat with both of their front cameras turned on. I currently know that GameKit supports the voice chat option but could not find any source for video chat. Is it possible set up a video chat on an online game session?. What libraries can I use that have support in implementing the video chat (AVFoundation) ? Your assistance is greatly appreciated.
2
0
1.4k
Feb ’24
iOS 17 Crash
We are noticing below iOS crash majorly happening from iOS 17 version. Can someone please check and let me know what might be causing this crash and how to solve this? Attached full crash report from app store. Last Exception Backtrace: 0 CoreFoundation 0x1b5cce69c __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x1adf67c80 objc_exception_throw + 60 (objc-exception.mm:356) 2 UIKitCore 0x1b8592ab4 -[UIViewController _presentViewController:withAnimationController:completion:] + 4236 (UIViewController.m:0) 3 UIKitCore 0x1b859312c __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 92 (UIViewController.m:9730) 4 UIKitCore 0x1b7f36fac -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 128 (UIViewControllerTransitioning.m:1205) 5 UIKitCore 0x1b7f36ab4 -[_UIViewControllerTransitionContext _runAlongsideCompletions] + 140 (UIViewControllerTransitioning.m:393) 6 UIKitCore 0x1b7f36144 -[_UIViewControllerTransitionContext completeTransition:] + 128 (UIViewControllerTransitioning.m:307) 7 UIKitCore 0x1b80a9460 -[UITransitionView notifyDidCompleteTransition:] + 180 (UITransitionView.m:280) 8 UIKitCore 0x1b80a9118 -[UITransitionView _didCompleteTransition:] + 832 (UITransitionView.m:249) 9 UIKitCore 0x1b7e91d78 UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK + 36 (UIView.m:16376) 10 UIKitCore 0x1b7e91510 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 624 (UIView.m:16409) 11 UIKitCore 0x1b7e90b88 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 436 (UIView.m:0) 12 UIKitCore 0x1b7e72d84 -[UIViewAnimationState animationDidStop:finished:] + 196 (UIView.m:2407) 13 UIKitCore 0x1b7e72e98 -[UIViewAnimationState animationDidStop:finished:] + 472 (UIView.m:2426) 14 QuartzCore 0x1b725f980 run_animation_callbacks(void*) + 132 (CALayer.mm:7713) 15 libdispatch.dylib 0x1bdbd9300 _dispatch_client_callout + 20 (object.m:561) 16 libdispatch.dylib 0x1bdbe7998 _dispatch_main_queue_drain + 984 (queue.c:7813) 17 libdispatch.dylib 0x1bdbe75b0 _dispatch_main_queue_callback_4CF + 44 (queue.c:7973) 18 CoreFoundation 0x1b5c1901c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1780) 19 CoreFoundation 0x1b5c15d28 __CFRunLoopRun + 1996 (CFRunLoop.c:3149) 20 CoreFoundation 0x1b5c15478 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 21 GraphicsServices 0x1f91964f8 GSEventRunModal + 164 (GSEvent.c:2196) 22 UIKitCore 0x1b803962c -[UIApplication _run] + 888 (UIApplication.m:3685) 23 UIKitCore 0x1b8038c68 UIApplicationMain + 340 (UIApplication.m:5270) 24 UnityFramework 0x11151c310 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92 (main.mm:124) 25 myapp 0x10497c17c main + 60 (main.mm:26) 26 dyld 0x1d894edcc start + 2240 (dyldMain.cpp:1269) Kernel Triage: VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001fd349fbc __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x000000021fc0b680 pthread_kill + 268 (pthread.c:1681) 2 libsystem_c.dylib 0x00000001bdc91c24 __abort + 136 (abort.c:159) 3 libsystem_c.dylib 0x00000001bdc91b9c abort + 192 (abort.c:126) 4 libc++abi.dylib 0x000000021fb35ff8 abort_message + 132 (abort_message.cpp:78) 5 libc++abi.dylib 0x000000021fb25f90 demangling_terminate_handler() + 348 (cxa_default_handlers.cpp:77) 6 libobjc.A.dylib 0x00000001adf6ada4 _objc_terminate() + 144 (objc-exception.mm:496) 7 UnityFramework 0x000000011358d254 CPPExceptionTerminate() + 332 (BSG_KSCrashSentry_CPPException.mm:137) 8 libc++abi.dylib 0x000000021fb353bc std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59) 9 libc++abi.dylib 0x000000021fb35360 std::terminate() + 108 (cxa_handlers.cpp:88) 10 libdispatch.dylib 0x00000001bdbd9314 _dispatch_client_callout + 40 (object.m:564) 11 libdispatch.dylib 0x00000001bdbe7998 _dispatch_main_queue_drain + 984 (queue.c:7813) 12 libdispatch.dylib 0x00000001bdbe75b0 _dispatch_main_queue_callback_4CF + 44 (queue.c:7973) 13 CoreFoundation 0x00000001b5c1901c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1780) 14 CoreFoundation 0x00000001b5c15d28 __CFRunLoopRun + 1996 (CFRunLoop.c:3149) 15 CoreFoundation 0x00000001b5c15478 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 16 GraphicsServices 0x00000001f91964f8 GSEventRunModal + 164 (GSEvent.c:2196) 17 UIKitCore 0x00000001b803962c -[UIApplication _run] + 888 (UIApplication.m:3685) 18 UIKitCore 0x00000001b8038c68 UIApplicationMain + 340 (UIApplication.m:5270) 19 UnityFramework 0x000000011151c310 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92 (main.mm:124) 20 myapp 0x000000010497c17c main + 60 (main.mm:26) 21 dyld 0x00000001d894edcc start + 2240 (dyldMain.cpp:1269) NSInvalidArgumentException.txt
0
0
5.5k
Feb ’24
[iOS 17] GKAppLevelSignInVisibility fetchAppLevelVisibilityConstraintsWithHandler crash
We noticing below crash mainly happening in iOS 17. Can someone check and confirm what is the root cause for this and how to fix the crash. GKAppLevelSignInVisibility fetchAppLevelVisibilityConstraintsWithHandler Thread 36 Crashed: 0 CoreFoundation 0x00000001904a9d6c -[__NSDictionaryM setObject:forKeyedSubscript:] + 452 (NSDictionaryM.m:202) 1 GameCenterUICore 0x000000020fe6d508 __76+[GKAppLevelSignInVisibility fetchAppLevelVisibilityConstraintsWithHandler:]_block_invoke_3 + 84 (GKAppLevelSignInVisibility.m:82) 2 GameCenterFoundation 0x00000001c8b8971c @objc closure #1 in LimitedPresentationManager.presentationDisabled(config:context:) + 268 3 GameCenterFoundation 0x00000001c8b8b111 partial apply for @objc closure #1 in LimitedPresentationManager.presentationDisabled(config:context:) + 1 4 GameCenterFoundation 0x00000001c8b8b101 thunk for @escaping @callee_guaranteed @Sendable @async () -> () + 1 5 GameCenterFoundation 0x00000001c8b8b105 partial apply for thunk for @escaping @callee_guaranteed @Sendable @async () -> () + 1 6 GameCenterFoundation 0x00000001c8b8aa0d specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 (:0) 7 GameCenterFoundation 0x00000001c8b8ab6d partial apply for specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 (:0) 8 libswift_Concurrency.dylib 0x000000019b78da41 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:463) Full iOS crash log
1
0
4.5k
Feb ’24
AGPT not working properly.
I am on a MacBook Pro 2023. 16inch, 16gb ram, 1tb drive. I am on the latest MacOs (Sonoma 14.3.1) and using the steps from the Apple Gaming Wiki to download the Game Porting Toolkit. I have met all the requirements. I tried using the automated installer, didn't work. I tried doing homebrew, and it worked all up until I got to the step where I had to run the command to download Apple tap: brew tap apple/apple http://github.com/apple/homebrew-apple I get this error: Logs: /Users/MYNAME/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/MYNAME/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/MYNAME/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/MYNAME/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/MYNAME/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
2
1
1.1k
Feb ’24
Game Center Achievements with 1,000 Units
I'm putting together a group of achievements on Game Center for my new game. From what I read, you must just adjust the "Percent Complete" when reporting updates on an achievement. However, you can only use whole numbers when doing that. So, how would one update a single "unit" to an achievement that needs 1,000 units to achieve? Any suggestions would be very helpful. Thanks!
1
0
824
Feb ’24
Game Porting Toolkit Error
I tried twice to install homebrew and I got a error message twice: Error: apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/omarzunun/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
1
1
2.6k
Jan ’24
Matchmaker connecting issues on Mobile network
I'm trying to establish a connection between two devices using mobile network. The config in both devices are ok allowing use mobile data for the app. I'm able to connect and start the game with WIFI networ `// Initiate matchmaking - (void)initiateMatchmakingWithViewController:(UIViewController*)rustViewController { dispatch_async(dispatch_get_main_queue(), ^{ if (![GKLocalPlayer localPlayer].isAuthenticated) { NSLog(@"Player is not authenticated."); return; } NSLog(@"Preparing MatchMaker"); GKMatchRequest *request = [[GKMatchRequest alloc] init]; request.minPlayers = 2; request.maxPlayers = 2; GKMatchmakerViewController *mmvc = [[GKMatchmakerViewController alloc] initWithMatchRequest:request]; mmvc.matchmakerDelegate = self; // Use the passed view controller to present the matchmaking UI [rustViewController presentViewController:mmvc animated:YES completion:nil]; NSLog(@"MatchMaker running...."); // Store the rustViewController for later, to revert back to it originalViewController = rustViewController; }); } // GKMatchmakerViewControllerDelegate methods - (void)matchmakerViewControllerWasCancelled:(GKMatchmakerViewController *)viewController { [originalViewController dismissViewControllerAnimated:YES completion:nil]; NSLog(@"Matchmaking was cancelled."); } - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFailWithError:(NSError *)error { [originalViewController dismissViewControllerAnimated:YES completion:nil]; NSLog(@"Matchmaking failed with error: %@", error.localizedDescription); } - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match { [originalViewController dismissViewControllerAnimated:YES completion:nil]; self.currentMatch = match; match.delegate = self; NSLog(@"Match found."); // Fetch details for each player in the match NSMutableArray<NSString *> *playerIDs = [NSMutableArray array]; for (GKPlayer *player in match.players) { [playerIDs addObject:player.playerID]; } [GKPlayer loadPlayersForIdentifiers:playerIDs withCompletionHandler:^(NSArray<GKPlayer *> *players, NSError *error) { if (error) { NSLog(@"Error retrieving player details: %@", error.localizedDescription); return; } for (GKPlayer *player in players) { if (![player.playerID isEqualToString:GKLocalPlayer.localPlayer.playerID]) { [self loadAndStoreAvatarForRemotePlayer:player]; } } }]; }` I can see how both clients are in state "connecting" but the log "Match found." it's never set. I also can see this log "[Match] syncPlayers failed to loadPlayersForLegacyIdentifiers"
1
2
788
Jan ’24
GKLocalPlayer.Local.FetchItems() Task Error on Unity
We are using apple unity plugin (gamekit) to authorized player using game center account. To get player the info we run a task from the plugin, var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems(); But when this code run, there is an error on the xcode application on mac. The error is the following, Thread 1: EXC_BAD_ACCESS (code=257, address=0x2)
15
0
4.8k
Jan ’24
GKTurnBasedMatchmakerViewController showExistingMatches not always showing
In a SwiftUI game using a UIViewControllerRepresentable; When presenting a GKTurnBasedMatchmakerViewController view with showExistingMatches set to true, sometimes the Invite view is presented and not the existing matches, dismissing it or even inviting someone does not stop it from presenting the next time it's called. Sometimes logging out and of Game Center and back in fixes it other times a restart of the device is required. typealias ViewControllerRepresentable = UIViewControllerRepresentable struct GameCenterView: ViewControllerRepresentable { ... // Creates a new view controller func makeUIViewController(context: Context) -> GKTurnBasedMatchmakerViewController { let request = GKMatchRequest() request.minPlayers = 2 request.maxPlayers = 2 request.inviteMessage = "Would you like to play a game of X?" request.defaultNumberOfPlayers = 2 let viewController = GKTurnBasedMatchmakerViewController(matchRequest: request) viewController.showExistingMatches = true viewController.turnBasedMatchmakerDelegate = context.coordinator return viewController } ...
0
0
660
Jan ’24
Game Center MatchMaker only work on WIFI
I'm working in a game where I integrate matchmaker and it's working fine when I try with two devices under same wifi network, but in the moment I use 5g mobile network and I do the matchmaker, I can still see each other but the game did not start and I see error sending data to the remote player. The game is not yet published and I'm using TestFlight for the clients.
0
0
861
Jan ’24
MacOS cannot send and receive Game Center multiplayer Invitation
I'm trying to implement multiplayer invitation from game center for macos, ios, tvos following this https://developer.apple.com/documentation/gamekit/finding_multiple_players_for_a_game?language=objc Implementation works for tvos and ios, I can invite my friends, Start Game and continue sending data. But macos still doesn't work at all. I tried using build that works on iOS to invite macos player, but my mac cannot even receive the invitation notification from game center (game is installed already on mac). While from mac, my invitation process is stuck here until it's failed Is there any specific setting on macos to enable game center invitation?
2
0
1.1k
Jan ’24
GameKit - iCloud Sign In Error
Hi everyone, I'm trying to implement matchmaking in visionOS using GameKit and GameCenter. I'm following the example project that been shared but I get an error. Error: The requested operation could not be completed because you are not signed in to iCloud.. I'm getting this error as a result of matchmaking. I'm already logged in to iCloud in Vision Pro Simulator. I've tried to switch off-on every related settings but didn't work. I'm using latest Xcode Dev Beta and visionOS Beta v6. Would you mind share me any workaround? Regards, Melih
3
0
1.8k
Jan ’24
Crash on launch, while in review - but no crash in Xcode or TestFlight
Hi all! My new iOS app (first one in Swift and SpriteKit, was using ObjectiveC and Cocos2D before, a few years back) - got rejected with the dreaded "We were unable to review your app as it crashed on launch.", That's especially bad news when it never ever crashed on any on our devices when testing (variety of phones, iPads and all sort of iOS) either in debug or release, before submission. So no luck repro-ing! The crashlog text file apple review team sent back, renamed as .crash, seems to open in Xcode (right click on it) when linked to the right project and seems to point in the leaderboard code fetching the local authenticated user's score. This is some code that I shamelessly copy/pasted from a StackOverflow page a few months ago, and seemed to work right away so moved-on back then, but something must be unsafe in there (sorry, bit of a rookie with Swift optionals etc). Any help would be much appreciated as this code seems to work fine in debug, without warnings or anything, and also works fine in release using TestFlight - so we simply cannot repro the apple QA issue, and we need to fix it blind! This is the function below that is crashing, right on the line that has the "{ player, _, _ in ": func sync_hiscore() { if (GKLocalPlayer.local.isAuthenticated) { if #available(iOS 14.0, *) { GKLeaderboard.loadLeaderboards( IDs: ["HatStacker_LD01"] ) { leaderboards, _ in leaderboards?[0].loadEntries( for: [GKLocalPlayer.local], timeScope: .allTime ) { player, _, _ in // &lt;&lt;&lt;&lt; !!! CRASHES HERE!! if ( player!.score &gt; player_hiscore) { player_hiscore = player!.score } } } } } } I've also attached the full crashlog if that's of any help! Many thanks all, sorry for such a Swift rookie question, but to add to the confusion this is also the first time one of our apps gets rejected for such an obvious bad crash at launch, that no one has seen during our weeks of testing! Any idea why it's only in release and only in the apple HQ/review env that we get that error? Could they have an invalid Game Center account that is confusing the "player" score fetching? Cheers, JBB HatStacker_build4.crash
5
0
3.1k
Jan ’24
Bad network latency when using Game Center for real-time multiplayer
In our multiplayer game prototype, we experience a ping of 300 ms (at best) when using Game Center and GKMatch to send data between players, over the GKMatch.SendDataMode.unreliable channel. This latency is not suitable for a real-time game. When we tested alternative services like Unity's Relay under identical conditions (location, devices, and Wi-Fi), we achieved a ping of 120 ms. Is a ping value of 300 ms typical when using Game Center? I can think of possible reasons in case it's not typical, but I can't be sure: Is there a different behavior (servers relaying peer-to-peer connections) when the game is not yet released on the store? We're in Europe, maybe this is normal in Europe and better in US?
0
0
918
Jan ’24
I delete Gaming Port Kit and want to redownload it again, than it happened.
I've installed the GPTK before, but it pops up with some problems so I want to reinstall it again. So I deleted home brew and redownload all the materials I needed. But when it comes to install the game-porting-toolkit formula, I can't download it, did anyone have the same problem with me? jimmy@Jimmymbp14 ~ % brew -v install apple/apple/game-porting-toolkit Error: Formulae found in multiple taps: * apple/apple/game-porting-toolkit-compiler * gcenx/apple/game-porting-toolkit-compiler Please use the fully-qualified name (e.g. apple/apple/game-porting-toolkit-compiler) to refer to a specific formula. jimmy@Jimmymbp14 ~ %
Replies
0
Boosts
0
Views
1.4k
Activity
Mar ’24
USB HID Specifics for Mac OS?
I am currently developing an USB HID Device, specifically a type of Joystick. However it seems that any attempt of getting a joystick to work on Mac do not work. My prototype works perfectly on Windows, being recognised as such and receiving all data. On MacOS, the Joystick is not recognised as a Joystick though, and the OS does not seem to receiver any Input from it whatsoever. I have translated my code to use both Mouse and Keyboard, both work perfectly. I have also tried to have the Joystick identify as a Gamepad, but again, it works on Windows and is not recognised on Mac (is not recognised as a Gamepad). Are there any specific restrictions to HID devices on MacOS? Apple developer only seems to describe specifics from a software standpoint, not from the standpoint of someone developing hardware. And even then it only seems to describe very specific HID devices, such as mouse, keyboard or a stylus. Please also keep in mind that I don't have much experience developing MacOS applications.
Replies
2
Boosts
0
Views
3k
Activity
Mar ’24
NSMutableDictionary removeAllObjects does not free up used memory!
I have a custom Objective-C ObjectCache class that utilized NSMutableDictionary to store named objects (specifically large NSImage objects). The class has a maxItems property and clear method, which worked fine. - (void)clear { @synchronized(_cache) { [_cache removeAllObjects]; } } But yesterday I received a customer feedback complaining one of my app consumes up to 24GB memory. I verified that on my M1 Mac mini, and it's true. Even after calling clear method, memory usage shown in both Xcode debugger panel and Activity Monitor remains the same. It did work before. Once I close a picture gallery window by calling clear method, memory usage dropped immediately as shown in Activity Monitor. I suspect that this is a bug in ARM architecture. Does anyone else have same problem?
Replies
1
Boosts
0
Views
1.1k
Activity
Mar ’24
Using video chat instead of voice chat on online game ?
Hello, I am building an app that requires players joined to an online game session and to have a video chat with both of their front cameras turned on. I currently know that GameKit supports the voice chat option but could not find any source for video chat. Is it possible set up a video chat on an online game session?. What libraries can I use that have support in implementing the video chat (AVFoundation) ? Your assistance is greatly appreciated.
Replies
2
Boosts
0
Views
1.4k
Activity
Feb ’24
iOS 17 Crash
We are noticing below iOS crash majorly happening from iOS 17 version. Can someone please check and let me know what might be causing this crash and how to solve this? Attached full crash report from app store. Last Exception Backtrace: 0 CoreFoundation 0x1b5cce69c __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x1adf67c80 objc_exception_throw + 60 (objc-exception.mm:356) 2 UIKitCore 0x1b8592ab4 -[UIViewController _presentViewController:withAnimationController:completion:] + 4236 (UIViewController.m:0) 3 UIKitCore 0x1b859312c __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 92 (UIViewController.m:9730) 4 UIKitCore 0x1b7f36fac -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 128 (UIViewControllerTransitioning.m:1205) 5 UIKitCore 0x1b7f36ab4 -[_UIViewControllerTransitionContext _runAlongsideCompletions] + 140 (UIViewControllerTransitioning.m:393) 6 UIKitCore 0x1b7f36144 -[_UIViewControllerTransitionContext completeTransition:] + 128 (UIViewControllerTransitioning.m:307) 7 UIKitCore 0x1b80a9460 -[UITransitionView notifyDidCompleteTransition:] + 180 (UITransitionView.m:280) 8 UIKitCore 0x1b80a9118 -[UITransitionView _didCompleteTransition:] + 832 (UITransitionView.m:249) 9 UIKitCore 0x1b7e91d78 UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK + 36 (UIView.m:16376) 10 UIKitCore 0x1b7e91510 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 624 (UIView.m:16409) 11 UIKitCore 0x1b7e90b88 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 436 (UIView.m:0) 12 UIKitCore 0x1b7e72d84 -[UIViewAnimationState animationDidStop:finished:] + 196 (UIView.m:2407) 13 UIKitCore 0x1b7e72e98 -[UIViewAnimationState animationDidStop:finished:] + 472 (UIView.m:2426) 14 QuartzCore 0x1b725f980 run_animation_callbacks(void*) + 132 (CALayer.mm:7713) 15 libdispatch.dylib 0x1bdbd9300 _dispatch_client_callout + 20 (object.m:561) 16 libdispatch.dylib 0x1bdbe7998 _dispatch_main_queue_drain + 984 (queue.c:7813) 17 libdispatch.dylib 0x1bdbe75b0 _dispatch_main_queue_callback_4CF + 44 (queue.c:7973) 18 CoreFoundation 0x1b5c1901c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1780) 19 CoreFoundation 0x1b5c15d28 __CFRunLoopRun + 1996 (CFRunLoop.c:3149) 20 CoreFoundation 0x1b5c15478 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 21 GraphicsServices 0x1f91964f8 GSEventRunModal + 164 (GSEvent.c:2196) 22 UIKitCore 0x1b803962c -[UIApplication _run] + 888 (UIApplication.m:3685) 23 UIKitCore 0x1b8038c68 UIApplicationMain + 340 (UIApplication.m:5270) 24 UnityFramework 0x11151c310 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92 (main.mm:124) 25 myapp 0x10497c17c main + 60 (main.mm:26) 26 dyld 0x1d894edcc start + 2240 (dyldMain.cpp:1269) Kernel Triage: VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001fd349fbc __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x000000021fc0b680 pthread_kill + 268 (pthread.c:1681) 2 libsystem_c.dylib 0x00000001bdc91c24 __abort + 136 (abort.c:159) 3 libsystem_c.dylib 0x00000001bdc91b9c abort + 192 (abort.c:126) 4 libc++abi.dylib 0x000000021fb35ff8 abort_message + 132 (abort_message.cpp:78) 5 libc++abi.dylib 0x000000021fb25f90 demangling_terminate_handler() + 348 (cxa_default_handlers.cpp:77) 6 libobjc.A.dylib 0x00000001adf6ada4 _objc_terminate() + 144 (objc-exception.mm:496) 7 UnityFramework 0x000000011358d254 CPPExceptionTerminate() + 332 (BSG_KSCrashSentry_CPPException.mm:137) 8 libc++abi.dylib 0x000000021fb353bc std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59) 9 libc++abi.dylib 0x000000021fb35360 std::terminate() + 108 (cxa_handlers.cpp:88) 10 libdispatch.dylib 0x00000001bdbd9314 _dispatch_client_callout + 40 (object.m:564) 11 libdispatch.dylib 0x00000001bdbe7998 _dispatch_main_queue_drain + 984 (queue.c:7813) 12 libdispatch.dylib 0x00000001bdbe75b0 _dispatch_main_queue_callback_4CF + 44 (queue.c:7973) 13 CoreFoundation 0x00000001b5c1901c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1780) 14 CoreFoundation 0x00000001b5c15d28 __CFRunLoopRun + 1996 (CFRunLoop.c:3149) 15 CoreFoundation 0x00000001b5c15478 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 16 GraphicsServices 0x00000001f91964f8 GSEventRunModal + 164 (GSEvent.c:2196) 17 UIKitCore 0x00000001b803962c -[UIApplication _run] + 888 (UIApplication.m:3685) 18 UIKitCore 0x00000001b8038c68 UIApplicationMain + 340 (UIApplication.m:5270) 19 UnityFramework 0x000000011151c310 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92 (main.mm:124) 20 myapp 0x000000010497c17c main + 60 (main.mm:26) 21 dyld 0x00000001d894edcc start + 2240 (dyldMain.cpp:1269) NSInvalidArgumentException.txt
Replies
0
Boosts
0
Views
5.5k
Activity
Feb ’24
[iOS 17] GKAppLevelSignInVisibility fetchAppLevelVisibilityConstraintsWithHandler crash
We noticing below crash mainly happening in iOS 17. Can someone check and confirm what is the root cause for this and how to fix the crash. GKAppLevelSignInVisibility fetchAppLevelVisibilityConstraintsWithHandler Thread 36 Crashed: 0 CoreFoundation 0x00000001904a9d6c -[__NSDictionaryM setObject:forKeyedSubscript:] + 452 (NSDictionaryM.m:202) 1 GameCenterUICore 0x000000020fe6d508 __76+[GKAppLevelSignInVisibility fetchAppLevelVisibilityConstraintsWithHandler:]_block_invoke_3 + 84 (GKAppLevelSignInVisibility.m:82) 2 GameCenterFoundation 0x00000001c8b8971c @objc closure #1 in LimitedPresentationManager.presentationDisabled(config:context:) + 268 3 GameCenterFoundation 0x00000001c8b8b111 partial apply for @objc closure #1 in LimitedPresentationManager.presentationDisabled(config:context:) + 1 4 GameCenterFoundation 0x00000001c8b8b101 thunk for @escaping @callee_guaranteed @Sendable @async () -> () + 1 5 GameCenterFoundation 0x00000001c8b8b105 partial apply for thunk for @escaping @callee_guaranteed @Sendable @async () -> () + 1 6 GameCenterFoundation 0x00000001c8b8aa0d specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 (:0) 7 GameCenterFoundation 0x00000001c8b8ab6d partial apply for specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 (:0) 8 libswift_Concurrency.dylib 0x000000019b78da41 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:463) Full iOS crash log
Replies
1
Boosts
0
Views
4.5k
Activity
Feb ’24
AGPT not working properly.
I am on a MacBook Pro 2023. 16inch, 16gb ram, 1tb drive. I am on the latest MacOs (Sonoma 14.3.1) and using the steps from the Apple Gaming Wiki to download the Game Porting Toolkit. I have met all the requirements. I tried using the automated installer, didn't work. I tried doing homebrew, and it worked all up until I got to the step where I had to run the command to download Apple tap: brew tap apple/apple http://github.com/apple/homebrew-apple I get this error: Logs: /Users/MYNAME/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/MYNAME/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/MYNAME/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/MYNAME/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/MYNAME/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
Replies
2
Boosts
1
Views
1.1k
Activity
Feb ’24
Game Center Achievements with 1,000 Units
I'm putting together a group of achievements on Game Center for my new game. From what I read, you must just adjust the "Percent Complete" when reporting updates on an achievement. However, you can only use whole numbers when doing that. So, how would one update a single "unit" to an achievement that needs 1,000 units to achieve? Any suggestions would be very helpful. Thanks!
Replies
1
Boosts
0
Views
824
Activity
Feb ’24
Game Porting Toolkit Error
I tried twice to install homebrew and I got a error message twice: Error: apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/omarzunun/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
Replies
1
Boosts
1
Views
2.6k
Activity
Jan ’24
Matchmaker connecting issues on Mobile network
I'm trying to establish a connection between two devices using mobile network. The config in both devices are ok allowing use mobile data for the app. I'm able to connect and start the game with WIFI networ `// Initiate matchmaking - (void)initiateMatchmakingWithViewController:(UIViewController*)rustViewController { dispatch_async(dispatch_get_main_queue(), ^{ if (![GKLocalPlayer localPlayer].isAuthenticated) { NSLog(@"Player is not authenticated."); return; } NSLog(@"Preparing MatchMaker"); GKMatchRequest *request = [[GKMatchRequest alloc] init]; request.minPlayers = 2; request.maxPlayers = 2; GKMatchmakerViewController *mmvc = [[GKMatchmakerViewController alloc] initWithMatchRequest:request]; mmvc.matchmakerDelegate = self; // Use the passed view controller to present the matchmaking UI [rustViewController presentViewController:mmvc animated:YES completion:nil]; NSLog(@"MatchMaker running...."); // Store the rustViewController for later, to revert back to it originalViewController = rustViewController; }); } // GKMatchmakerViewControllerDelegate methods - (void)matchmakerViewControllerWasCancelled:(GKMatchmakerViewController *)viewController { [originalViewController dismissViewControllerAnimated:YES completion:nil]; NSLog(@"Matchmaking was cancelled."); } - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFailWithError:(NSError *)error { [originalViewController dismissViewControllerAnimated:YES completion:nil]; NSLog(@"Matchmaking failed with error: %@", error.localizedDescription); } - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match { [originalViewController dismissViewControllerAnimated:YES completion:nil]; self.currentMatch = match; match.delegate = self; NSLog(@"Match found."); // Fetch details for each player in the match NSMutableArray<NSString *> *playerIDs = [NSMutableArray array]; for (GKPlayer *player in match.players) { [playerIDs addObject:player.playerID]; } [GKPlayer loadPlayersForIdentifiers:playerIDs withCompletionHandler:^(NSArray<GKPlayer *> *players, NSError *error) { if (error) { NSLog(@"Error retrieving player details: %@", error.localizedDescription); return; } for (GKPlayer *player in players) { if (![player.playerID isEqualToString:GKLocalPlayer.localPlayer.playerID]) { [self loadAndStoreAvatarForRemotePlayer:player]; } } }]; }` I can see how both clients are in state "connecting" but the log "Match found." it's never set. I also can see this log "[Match] syncPlayers failed to loadPlayersForLegacyIdentifiers"
Replies
1
Boosts
2
Views
788
Activity
Jan ’24
GKLocalPlayer.Local.FetchItems() Task Error on Unity
We are using apple unity plugin (gamekit) to authorized player using game center account. To get player the info we run a task from the plugin, var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems(); But when this code run, there is an error on the xcode application on mac. The error is the following, Thread 1: EXC_BAD_ACCESS (code=257, address=0x2)
Replies
15
Boosts
0
Views
4.8k
Activity
Jan ’24
GKTurnBasedMatchmakerViewController showExistingMatches not always showing
In a SwiftUI game using a UIViewControllerRepresentable; When presenting a GKTurnBasedMatchmakerViewController view with showExistingMatches set to true, sometimes the Invite view is presented and not the existing matches, dismissing it or even inviting someone does not stop it from presenting the next time it's called. Sometimes logging out and of Game Center and back in fixes it other times a restart of the device is required. typealias ViewControllerRepresentable = UIViewControllerRepresentable struct GameCenterView: ViewControllerRepresentable { ... // Creates a new view controller func makeUIViewController(context: Context) -> GKTurnBasedMatchmakerViewController { let request = GKMatchRequest() request.minPlayers = 2 request.maxPlayers = 2 request.inviteMessage = "Would you like to play a game of X?" request.defaultNumberOfPlayers = 2 let viewController = GKTurnBasedMatchmakerViewController(matchRequest: request) viewController.showExistingMatches = true viewController.turnBasedMatchmakerDelegate = context.coordinator return viewController } ...
Replies
0
Boosts
0
Views
660
Activity
Jan ’24
Game Center MatchMaker only work on WIFI
I'm working in a game where I integrate matchmaker and it's working fine when I try with two devices under same wifi network, but in the moment I use 5g mobile network and I do the matchmaker, I can still see each other but the game did not start and I see error sending data to the remote player. The game is not yet published and I'm using TestFlight for the clients.
Replies
0
Boosts
0
Views
861
Activity
Jan ’24
MacOS cannot send and receive Game Center multiplayer Invitation
I'm trying to implement multiplayer invitation from game center for macos, ios, tvos following this https://developer.apple.com/documentation/gamekit/finding_multiple_players_for_a_game?language=objc Implementation works for tvos and ios, I can invite my friends, Start Game and continue sending data. But macos still doesn't work at all. I tried using build that works on iOS to invite macos player, but my mac cannot even receive the invitation notification from game center (game is installed already on mac). While from mac, my invitation process is stuck here until it's failed Is there any specific setting on macos to enable game center invitation?
Replies
2
Boosts
0
Views
1.1k
Activity
Jan ’24
GameKit - iCloud Sign In Error
Hi everyone, I'm trying to implement matchmaking in visionOS using GameKit and GameCenter. I'm following the example project that been shared but I get an error. Error: The requested operation could not be completed because you are not signed in to iCloud.. I'm getting this error as a result of matchmaking. I'm already logged in to iCloud in Vision Pro Simulator. I've tried to switch off-on every related settings but didn't work. I'm using latest Xcode Dev Beta and visionOS Beta v6. Would you mind share me any workaround? Regards, Melih
Replies
3
Boosts
0
Views
1.8k
Activity
Jan ’24
Crash on launch, while in review - but no crash in Xcode or TestFlight
Hi all! My new iOS app (first one in Swift and SpriteKit, was using ObjectiveC and Cocos2D before, a few years back) - got rejected with the dreaded "We were unable to review your app as it crashed on launch.", That's especially bad news when it never ever crashed on any on our devices when testing (variety of phones, iPads and all sort of iOS) either in debug or release, before submission. So no luck repro-ing! The crashlog text file apple review team sent back, renamed as .crash, seems to open in Xcode (right click on it) when linked to the right project and seems to point in the leaderboard code fetching the local authenticated user's score. This is some code that I shamelessly copy/pasted from a StackOverflow page a few months ago, and seemed to work right away so moved-on back then, but something must be unsafe in there (sorry, bit of a rookie with Swift optionals etc). Any help would be much appreciated as this code seems to work fine in debug, without warnings or anything, and also works fine in release using TestFlight - so we simply cannot repro the apple QA issue, and we need to fix it blind! This is the function below that is crashing, right on the line that has the "{ player, _, _ in ": func sync_hiscore() { if (GKLocalPlayer.local.isAuthenticated) { if #available(iOS 14.0, *) { GKLeaderboard.loadLeaderboards( IDs: ["HatStacker_LD01"] ) { leaderboards, _ in leaderboards?[0].loadEntries( for: [GKLocalPlayer.local], timeScope: .allTime ) { player, _, _ in // &lt;&lt;&lt;&lt; !!! CRASHES HERE!! if ( player!.score &gt; player_hiscore) { player_hiscore = player!.score } } } } } } I've also attached the full crashlog if that's of any help! Many thanks all, sorry for such a Swift rookie question, but to add to the confusion this is also the first time one of our apps gets rejected for such an obvious bad crash at launch, that no one has seen during our weeks of testing! Any idea why it's only in release and only in the apple HQ/review env that we get that error? Could they have an invalid Game Center account that is confusing the "player" score fetching? Cheers, JBB HatStacker_build4.crash
Replies
5
Boosts
0
Views
3.1k
Activity
Jan ’24
Bad network latency when using Game Center for real-time multiplayer
In our multiplayer game prototype, we experience a ping of 300 ms (at best) when using Game Center and GKMatch to send data between players, over the GKMatch.SendDataMode.unreliable channel. This latency is not suitable for a real-time game. When we tested alternative services like Unity's Relay under identical conditions (location, devices, and Wi-Fi), we achieved a ping of 120 ms. Is a ping value of 300 ms typical when using Game Center? I can think of possible reasons in case it's not typical, but I can't be sure: Is there a different behavior (servers relaying peer-to-peer connections) when the game is not yet released on the store? We're in Europe, maybe this is normal in Europe and better in US?
Replies
0
Boosts
0
Views
918
Activity
Jan ’24