macCatalyst crash on UIScene in macOS 11 (Big Sur)

Viewed 209

I have a macCatalyst app that works perfectly on macOS 10.14, however on upgrading to macOS 11 (Big Sur) both I and my users are complaining that the app crashes on launch. I get an error message "Parameter was not of class UIScene" - do macCatalyst apps now require the use of scenes?

On further inspection, I see the following:

2020-11-28 01:48:40.327810+0000 AppName [13691:435322] *** Assertion failure in -[_UISceneMacHelperUtilities sceneIdentifierForUIScene:], _UISceneMacHelperUtilities.m:83

2020-11-28 01:48:40.336334+0000 AppName[13691:435322] [General] An uncaught exception was raised
2020-11-28 01:48:40.336423+0000 AppName[13691:435322] [General] Parameter was not of class UIScene.
2020-11-28 01:48:40.336545+0000 AppName[13691:435322] [General] (
    0   CoreFoundation                      0x00007fff204ae6af __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007fff201e63c9 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff204d7512 +[NSException raise:format:arguments:] + 88
    3   Foundation                          0x00007fff212906c9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
    4   UIKitCore                           0x00007fff44a7b2c6 -[_UISceneMacHelperUtilities sceneIdentifierForUIScene:] + 195
    5   UIKitMacHelper                      0x00007fff34045f74 __46-[UINSApplicationDelegate _setupKeyWindowSync]_block_invoke + 393
    6   Foundation                          0x00007fff21192d6b -[__NSObserver _doit:] + 287
    7   CoreFoundation                      0x00007fff20429fdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    8   CoreFoundation                      0x00007fff204c589b ___CFXRegistrationPost_block_invoke + 49
    9   CoreFoundation                      0x00007fff204c580f _CFXRegistrationPost + 454
    10  CoreFoundation                      0x00007fff203fabce _CFXNotificationPost + 723
    11  Foundation                          0x00007fff21166abe -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
    12  UIKitCore                           0x00007fff44376779 -[UIWindow _makeKeyWindowIgnoringOldKeyWindow:] + 567
    13  AppName           0x00000001013fe0c0 $s25AppName13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0K7SessionCSo0K17ConnectionOptionsCtF + 1520
    14  AppName           0x00000001013feaa6 $s25AppName13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0K7SessionCSo0K17ConnectionOptionsCtFTo + 118
    15  UIKitCore                           0x00007fff44221a31 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 1463
    16  UIKitCore                           0x00007fff4421ffb1 -[UIApplication _connectUISceneFromFBSScene:transitionContext:] + 1109
    17  UIKitCore                           0x00007fff4421ecfe -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 299
    18  UIKitCore                           0x00007fff4421eb49 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 358
    19  FrontBoardServices                  0x00007fff317e7312 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 391
    20  FrontBoardServices                  0x00007fff318045df __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.176 + 102
    21  FrontBoardServices                  0x00007fff317d60c1 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
    22  FrontBoardServices                  0x00007fff318042b7 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 354
    23  libdispatch.dylib                   0x00000001040c50b0 _dispatch_client_callout + 8
    24  libdispatch.dylib                   0x00000001040c8927 _dispatch_block_invoke_direct + 286
    25  FrontBoardServices                  0x00007fff317d5fd8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
    26  FrontBoardServices                  0x00007fff3181e1c3 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
    27  FrontBoardServices                  0x00007fff317d5fa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
    28  CoreFoundation                      0x00007fff204349fc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    29  CoreFoundation                      0x00007fff20434964 __CFRunLoopDoSource0 + 180
    30  CoreFoundation                      0x00007fff204346df __CFRunLoopDoSources0 + 248
    31  CoreFoundation                      0x00007fff20433111 __CFRunLoopRun + 890
    32  CoreFoundation                      0x00007fff204326be CFRunLoopRunSpecific + 563
    33  HIToolbox                           0x00007fff2869efd0 RunCurrentEventLoopInMode + 292
    34  HIToolbox                           0x00007fff2869edcc ReceiveNextEventCommon + 709
    35  HIToolbox                           0x00007fff2869eaef _BlockUntilNextEventMatchingListInModeWithFilter + 64
    36  AppKit                              0x00007fff22c4bf85 _DPSNextEvent + 883
    37  AppKit                              0x00007fff22c4a74b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366
    38  AppKit                              0x00007fff22c3cbda -[NSApplication run] + 586
    39  AppKit                              0x00007fff22c10f31 NSApplicationMain + 816
    40  AppKit                              0x00007fff22f0744d _NSApplicationMainWithInfoDictionary + 16
    41  UIKitMacHelper                      0x00007fff3403332e UINSApplicationMain + 1418
    42  UIKitCore                           0x00007fff44202e30 UIApplicationMain + 144
    43  AppName           0x00000001014da40b main + 75
    44  libdyld.dylib                       0x00007fff20357631 start + 1
)
2020-11-28 01:48:40.337802+0000 AppName[13691:435322] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Parameter was not of class UIScene.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff204ae6af __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007fff201e63c9 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff204d7512 +[NSException raise:format:arguments:] + 88
    3   Foundation                          0x00007fff212906c9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
    4   UIKitCore                           0x00007fff44a7b2c6 -[_UISceneMacHelperUtilities sceneIdentifierForUIScene:] + 195
    5   UIKitMacHelper                      0x00007fff34045f74 __46-[UINSApplicationDelegate _setupKeyWindowSync]_block_invoke + 393
    6   Foundation                          0x00007fff21192d6b -[__NSObserver _doit:] + 287
    7   CoreFoundation                      0x00007fff20429fdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    8   CoreFoundation                      0x00007fff204c589b ___CFXRegistrationPost_block_invoke + 49
    9   CoreFoundation                      0x00007fff204c580f _CFXRegistrationPost + 454
    10  CoreFoundation                      0x00007fff203fabce _CFXNotificationPost + 723
    11  Foundation                          0x00007fff21166abe -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
    12  UIKitCore                           0x00007fff44376779 -[UIWindow _makeKeyWindowIgnoringOldKeyWindow:] + 567
    13  AppName           0x00000001013fe0c0 $s25AppName13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0K7SessionCSo0K17ConnectionOptionsCtF + 1520
    14  AppName           0x00000001013feaa6 $s25AppName13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0K7SessionCSo0K17ConnectionOptionsCtFTo + 118
    15  UIKitCore                           0x00007fff44221a31 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 1463
    16  UIKitCore                           0x00007fff4421ffb1 -[UIApplication _connectUISceneFromFBSScene:transitionContext:] + 1109
    17  UIKitCore                           0x00007fff4421ecfe -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 299
    18  UIKitCore                           0x00007fff4421eb49 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 358
    19  FrontBoardServices                  0x00007fff317e7312 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 391
    20  FrontBoardServices                  0x00007fff318045df __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.176 + 102
    21  FrontBoardServices                  0x00007fff317d60c1 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
    22  FrontBoardServices                  0x00007fff318042b7 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 354
    23  libdispatch.dylib                   0x00000001040c50b0 _dispatch_client_callout + 8
    24  libdispatch.dylib                   0x00000001040c8927 _dispatch_block_invoke_direct + 286
    25  FrontBoardServices                  0x00007fff317d5fd8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
    26  FrontBoardServices                  0x00007fff3181e1c3 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
    27  FrontBoardServices                  0x00007fff317d5fa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
    28  CoreFoundation                      0x00007fff204349fc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    29  CoreFoundation                      0x00007fff20434964 __CFRunLoopDoSource0 + 180
    30  CoreFoundation                      0x00007fff204346df __CFRunLoopDoSources0 + 248
    31  CoreFoundation                      0x00007fff20433111 __CFRunLoopRun + 890
    32  CoreFoundation                      0x00007fff204326be CFRunLoopRunSpecific + 563
    33  HIToolbox                           0x00007fff2869efd0 RunCurrentEventLoopInMode + 292
    34  HIToolbox                           0x00007fff2869edcc ReceiveNextEventCommon + 709
    35  HIToolbox                           0x00007fff2869eaef _BlockUntilNextEventMatchingListInModeWithFilter + 64
    36  AppKit                              0x00007fff22c4bf85 _DPSNextEvent + 883
    37  AppKit                              0x00007fff22c4a74b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366
    38  AppKit                              0x00007fff22c3cbda -[NSApplication run] + 586
    39  AppKit                              0x00007fff22c10f31 NSApplicationMain + 816
    40  AppKit                              0x00007fff22f0744d _NSApplicationMainWithInfoDictionary + 16
    41  UIKitMacHelper                      0x00007fff3403332e UINSApplicationMain + 1418
    42  UIKitCore                           0x00007fff44202e30 UIApplicationMain + 144
    43  AppName           0x00000001014da40b main + 75
    44  libdyld.dylib                       0x00007fff20357631 start + 1

)

libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Parameter was not of class UIScene.'
terminating with uncaught exception of type NSException
0 Answers
Related