iPad app on MacOS crashes on launch

Hello,


I prepared an iPad app for running on MacOs and after a few small corretions I was able to build the app. However, it crashes right on startup.


The function

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

is called, where I prepare a window and the root view controller in code. After the function returns, the app crashes.


This is what the log looks like:


2019-06-08 13:25:04.804240+0200 myApp[3865:61331] Bundle is missing UIMenuBarItemTitleAbout key.
2019-06-08 13:25:04.806248+0200 myApp[3865:61331] Bundle is missing UIMenuBarItemTitleHide key.
2019-06-08 13:25:04.806325+0200 myApp[3865:61331] Bundle is missing UIMenuBarItemTitleQuit key.
2019-06-08 13:25:04.814513+0200 myApp[3865:61331] Bundle is missing UIMenuBarItemTitleHelp key.
2019-06-08 13:25:12.159975+0200 myApp[3865:61331] [General] An uncaught exception was raised
2019-06-08 13:25:12.160042+0200 myApp[3865:61331] [General] *** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: title)myApp2019-06-08 13:25:12.160241+0200 StundenplanHD[3865:61331] [General] (
  0   CoreFoundation                      0x00007fff3aaa7c63 __exceptionPreprocess + 250
  1   libobjc.A.dylib                     0x00007fff6ff7006b objc_exception_throw + 48
  2   CoreFoundation                      0x00007fff3ab6712a _CFThrowFormattedException + 202
  3   CoreFoundation                      0x00007fff3ab70ec5 -[__NSDictionaryM setObject:forKey:].cold.3 + 0
  4   CoreFoundation                      0x00007fff3a9fdf6e -[__NSDictionaryM setObject:forKey:] + 979
  5   UIKitCore                           0x00007fff76c3d9fc -[_UIMenuBarItem properties] + 99
  6   UIKitMacHelper                      0x00007fff6aaf0108 _insertUINSMenuItemsIntoNSMenu + 786
  7   UIKitMacHelper                      0x00007fff6aaf0c21 UINSNSMenuFromUINSMenu + 119
  8   UIKitMacHelper                      0x00007fff6aaf0d0b -[UINSMenuController _createNSMenu:forContextMenu:] + 79
  9   UIKitMacHelper                      0x00007fff6aaef9f2 -[UINSMenuController setMainMenuBar:] + 70
  10  UIKitCore                           0x00007fff7796044b -[_UIMenuBarController _rebuildRootCommandGroup] + 229
  11  UIKitCore                           0x00007fff76b12054 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 801
  12  UIKitCore                           0x00007fff775901f6 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 5764
  13  UIKitCore                           0x00007fff76b10745 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1342
  14  UIKitCore                           0x00007fff76eafd8e -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
  15  UIKitCore                           0x00007fff772715c2 _UIScenePerformActionsWithLifecycleActionMask + 78
  16  UIKitCore                           0x00007fff76eb0891 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
  17  UIKitCore                           0x00007fff76eb0361 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 467
  18  UIKitCore                           0x00007fff76eb06c6 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 811
  19  UIKitCore                           0x00007fff76eaff69 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 350
  20  UIKitCore                           0x00007fff76eb4383 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 159
  21  UIKitCore                           0x00007fff771d9126 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 832
  22  UIKitCore                           0x00007fff7728e1a4 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
  23  UIKitCore                           0x00007fff76eb3fa0 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 167
  24  UIKitCore                           0x00007fff7728e0a7 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
  25  UIKitCore                           0x00007fff76eb3df4 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 365
  26  UIKitCore                           0x00007fff76d5f093 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 541
  27  UIKitCore                           0x00007fff76d5df4d -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 389
  28  UIKitCore                           0x00007fff76d5ee10 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 404
  29  UIKitCore                           0x00007fff76b0c635 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 551
  30  UIKitCore                           0x00007fff76b0c388 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
  31  FrontBoardServices                  0x00007fff5630940c -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 453
  32  FrontBoardServices                  0x00007fff563284f2 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.162 + 102
  33  FrontBoardServices                  0x00007fff56311e49 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
  34  FrontBoardServices                  0x00007fff56328185 __86-[FBSWorkspaceScenesClient sceneID:createWithParamet 35  libdispatch.dylib                   0x00000001007f198f _dispatch_client_callout + 8
  36  libdispatch.dylib                   0x00000001007f51e3 _dispatch_block_invoke_direct + 289
  37  FrontBoardServices                  0x00007fff562f7c64 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
  38  FrontBoardServices                  0x00007fff562f7a2a -[FBSSerialQueue _performNext] + 436
  39  FrontBoardServices                  0x00007fff562f785e -[FBSSerialQueue _performNextFromRunLoopSource] + 33
  40  CoreFoundation                      0x00007fff3aa12fa5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
  41  CoreFoundation                      0x00007fff3aa12f35 __CFRunLoopDoSource0 + 112
  42  CoreFoundation                      0x00007fff3a9f699e __CFRunLoopDoSources0 + 209
  43  CoreFoundation                      0x00007fff3a9f5f9e __CFRunLoopRun + 1272
  44  CoreFoundation                      0x00007fff3a9f5821 CFRunLoopRunSpecific + 499
  45  HIToolbox                           0x00007fff396d57fd RunCurrentEventLoopInMode + 292
  46  HIToolbox                           0x00007fff396d5449 ReceiveNextEventCommon + 356
  47  HIToolbox                           0x00007fff396d52c7 _BlockUntilNextEventMatchingListInModeWithFilter + 64
  48  AppKit                              0x00007fff37d84cf8 _DPSNextEvent + 990
  49  AppKit                              0x00007fff37d83a6b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
  50  AppKit                              0x00007fff37d7e1b7 -[NSApplication run] + 658
  51  AppKit                              0x00007fff37d7004b NSApplicationMain + 777
  52  AppKit                              0x00007fff381f4022 _NSApplicationMainWithInfoDictionary + 16
  53  UIKitMacHelper                      0x00007fff6aad1ef9 UINSApplicationMain + 424
  54  UIKitCore                           0x00007fff76af6a91 UIApplicationMain + 2206
  55  StundenplanHD                       0x0000000100001ed0 main + 112
  56  libdyld.dylib                       0x00007fff712ce7a9 start + 1
  57  ???                                 0x0000000000000003 0x0 + 3
)

Is there anything I need to configure in addition?

Accepted Reply

To answer my question myself: For some reason the entry "Bundle name" (CFBundleName) was missing in my info.plist.

Replies

To answer my question myself: For some reason the entry "Bundle name" (CFBundleName) was missing in my info.plist.