So many crashes of presentViewController, we are seeing from Nov 2023.
Two of them were because of viewWillTransition and UIAlertController, so we fully removed these two from our app.
But now, after removing , we saw this issue popping up again showing GameCenterUI.
Last Exception Backtrace:
0 CoreFoundation 0x193c28f20 __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x18bad2018 objc_exception_throw + 60 (objc-exception.mm:356)
2 UIKitCore 0x196394154 -[UIViewController _presentViewController:withAnimationController:completion:] + 4272 (UIViewController.m:0)
3 UIKitCore 0x1963957e4 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 88 (UIViewController.m:9733)
4 UIKitCore 0x19638f81c -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 484 (UIViewController.m:9999)
5 UIKitCore 0x19638f544 -[UIViewController _presentViewController:animated:completion:] + 188 (UIViewController.m:9740)
6 UIKitCore 0x19638f3d8 -[UIViewController presentViewController:animated:completion:] + 164 (UIViewController.m:9936)
7 GameCenterUICore 0x21941d91c -[GKLocalPlayer(iOSAuthenticationUI) showViewController:usingPresentingViewController:wrapInNavController:] + 492 (GKLocalPlayer+iOSAuthenticationUI.m:87)
8 GameCenterUI 0x1bc2db5f8 __87-[GKLocalPlayer(AuthenticationExtras) showOnboardingUIFromViewController:signInOrigin:]_block_invoke.20 + 64 (GKLocalPlayer+AuthenticationExtras.m:248)
9 libdispatch.dylib 0x19bacddd4 _dispatch_client_callout + 20 (object.m:576)
10 libdispatch.dylib 0x19bad12d8 _dispatch_continuation_pop + 600 (queue.c:321)
11 libdispatch.dylib 0x19bae51c8 _dispatch_source_latch_and_call + 420 (source.c:596)
12 libdispatch.dylib 0x19bae3d8c _dispatch_source_invoke + 832 (source.c:961)
13 libdispatch.dylib 0x19badc4b4 _dispatch_main_queue_drain + 748 (queue.c:7898)
14 libdispatch.dylib 0x19badc1b8 _dispatch_main_queue_callback_4CF + 44 (queue.c:8058)
15 CoreFoundation 0x193bfb710 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
16 CoreFoundation 0x193bf8914 __CFRunLoopRun + 1996 (CFRunLoop.c:3149)
17 CoreFoundation 0x193bf7cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
18 GraphicsServices 0x1d8aa81a8 GSEventRunModal + 164 (GSEvent.c:2196)
19 UIKitCore 0x19623090c -[UIApplication _run] + 888 (UIApplication.m:3713)
20 UIKitCore 0x1962e49d0 UIApplicationMain + 340 (UIApplication.m:5303)
21 MyApp 0x102875f7c main + 64 (AppDelegate.swift:20)
22 dyld 0x1b72a9e4c start + 2240 (dyldMain.cpp:1298)
After adding GameCenter 72 days ago and 60k session, we see this crash. Surprising , we updated our app 5 days ago with removing viewwilltransition & uialertccontroller so that presentviewcontroller dont happen.
But this popped up first and only time now.
The code for GameCenter, we are using in our UIKit code is - https://github.com/fserrazes/GameCenterKit