1

I am trying to run a Xamarin.IOS app through visual studio community on macos but encounter the following exception on the splash screen, both in simulator and on a physical device. It previously worked, but after pushing changes (which worked) and taking a coffee break, the next time I built it stopped working. There is no VCS diff to the main repository, which runs fine for coworkers.

Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: Could not find a storyboard named 'Main' in bundle NSBundle </Users/User/Library/Developer/CoreSimulator/Devices/3AD1FBAC-EA67-4CC0-8D8D-212DA5429B51/data/Containers/Bundle/Application/7D30F8AC-D3A4-46FA-AA22-8EA50F1ABA43/Test.app> (loaded)
Native stack trace:
0   CoreFoundation                      0x000000011bc371bb __exceptionPreprocess + 331
1   libobjc.A.dylib                     0x000000011cc18735 objc_exception_throw + 48
2   UIKitCore                           0x000000012312e27a +[UIStoryboard storyboardWithName:bundle:] + 676
3   UIKitCore                           0x0000000122f8d016 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 76
4   UIKitCore                           0x0000000122f8d50c -[UIApplication _loadMainInterfaceFile] + 272
5   UIKitCore                           0x0000000122f8bb25 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1357
6   UIKitCore                           0x00000001227aa4e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
7   UIKitCore                           0x00000001227b329c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
8   UIKitCore                           0x00000001227aa126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233
9   UIKitCore                           0x00000001227aaae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085
10  UIKitCore                           0x00000001227a8cb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 795
11  UIKitCore                           0x00000001227a895f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435
12  UIKitCore                           0x00000001227ada90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 584
13  UIKitCore                           0x00000001227ae80e _performActionsWithDelayForTransitionContext + 100
14  UIKitCore                           0x00000001227ad7ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 221
15  UIKitCore                           0x00000001227b293a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
16  UIKitCore                           0x0000000122f8a44e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
17  UIKitCore                           0x0000000122b2ed09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357
18  FrontBoardServices                  0x000000011e76a2da -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
19  FrontBoardServices                  0x000000011e775443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271
20  FrontBoardServices                  0x000000011e774b3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
21  libdispatch.dylib                   0x000000011df3a54b _dispatch_client_callout + 8
22  libdispatch.dylib                   0x000000011df3d60b _dispatch_block_invoke_direct + 312
23  FrontBoardServices                  0x000000011e7a9ba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
24  FrontBoardServices                  0x000000011e7a9860 -[FBSSerialQueue _performNext] + 457
25  FrontBoardServices                  0x000000011e7a9e40 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
26  CoreFoundation                      0x000000011bb9c721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
27  CoreFoundation                      0x000000011bb9bf93 __CFRunLoopDoSources0 + 243
28  CoreFoundation                      0x000000011bb9663f __CFRunLoopRun + 1263
29  CoreFoundation                      0x000000011bb95e11 CFRunLoopRunSpecific + 625
30  GraphicsServices                    0x000000011fdf51dd GSEventRunModal + 62
31  UIKitCore                           0x0000000122f8d81d UIApplicationMain + 140
32  ???                                 0x0000000187cb6bce 0x0 + 6573222862
33  ???                                 0x0000000187cb6963 0x0 + 6573222243

I've been searching around and have found a few potential solutions to this issue, none have worked. I've tried:

Note that a clean + rebuild was done for each of these steps. I've additionally verified that Main.storyboard is in the 'Copy Bundle Resources' build phase, cloned my repository into a separate directory, fully re-installed visual studio (along with downloaded frameworks), and a number of other things I've came across searching around. No luck.

It is worth noting that the default Xamarin.IOS project does run on my machine, but does not explain why this project only fails to run on mine, but works on others.

Evar Smith
  • 21
  • 5
  • Would need more information than this. If somehow you can share code? I would suggest try creating a new story board and setting up as storyboard, to be used and then reverting back to your own storyboard. – soan saini Jan 02 '19 at 03:07
  • Thanks for the suggestion, I will try that; Unfortunately I can't share any code, however the error happens before any user code is executed. The lowest level that I seem to be able to catch the exception at is during the call to UIApplication.Main – Evar Smith Jan 03 '19 at 12:41
  • i would try shredding down every bit of main functionality and just keeping one landing screen. to see if things stil happen, Thank god we have Git branches to try this kind of thing. – soan saini Jan 07 '19 at 22:49

1 Answers1

0

Hi did you check the Main.storyboard added in the info.plist

Prasanth
  • 329
  • 2
  • 14