0

When I go to build and debug my iOS app, the simulator runs but I get an exception thrown and the simulator doesn't open. I'm using Visual Studio for Mac.

The error is:

Objective-C exception thrown.Name: NSInvalidArgumentException Reason:  
Could not find a storyboard named 'Main' in bundle NSBundle 
</Users/(Username 
here)/Library/Developer/CoreSimulator/Devices/23E98CA3-FC40-4AA4-8AAD-
62A9FADE1118/data/Containers/Bundle/Application/715B09C7-FBF2-41E6-
8FCD-A6329DE9E758/(AppName Here).app> (loaded)
Native stack trace:
    0   CoreFoundation                      0x0000000108f31b0b
__exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x0000000113b0e141 
objc_exception_throw + 48
    2   UIKit                               0x000000010d005cfb +
[UIStoryboard storyboardWithName:bundle:] + 663
    3   UIKit                               0x000000010c84590d -
[UIApplication _loadMainStoryboardFileNamed:bundle:] + 72
    4   UIKit                               0x000000010c845e13 -
[UIApplication _loadMainInterfaceFile] + 260
    5   UIKit                               0x000000010c8444b6 -
[UIApplication _runWithMainScene:transitionContext:completion:] + 1407
    6   UIKit                               0x000000010c8417f3 -
[UIApplication workspaceDidEndTransaction:] + 182
    7   FrontBoardServices                  0x00000001168265f6 
__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    8   FrontBoardServices                  0x000000011682646d -
[FBSSerialQueue _performNext] + 186
    9   FrontBoardServices                  0x00000001168267f6 -
[FBSSerialQueue _performNextFromRunLoopSource] + 45
    10  CoreFoundation                      0x0000000108ed7c01 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    11  CoreFoundation                      0x0000000108ebd0cf 
__CFRunLoopDoSources0 + 527
    12  CoreFoundation                      0x0000000108ebc5ff 
__CFRunLoopRun + 911
    13  CoreFoundation                      0x0000000108ebc016 
CFRunLoopRunSpecific + 406
    14  UIKit                               0x000000010c84008f -
[UIApplication _run] + 468
    15  UIKit                               0x000000010c846134 
UIApplicationMain + 159
    16  ???                                 0x000000012bee336c 0x0 + 
5031998316
    17  ???                                 0x0000000128fc6abd 0x0 + 
4982598333

Thanks, Z

Edit:

Adding picture.

Info.plist

Zailyn Tamayo
  • 112
  • 1
  • 9

2 Answers2

1

It seems like no main.storyboard can be found in your project. Check this pic

if the Main Interface is Main , check if main.storyboard exsits in your project. Or you can change it to other viewController.

ColeX
  • 14,062
  • 5
  • 43
  • 240
  • Hi, thanks for the information. I checked and Main is my Main interface and I have a main.storyboard in my project, which is why it's so weird. I will edit my post to include picture. Thank you! – Zailyn Tamayo Jul 21 '17 at 15:14
  • try to new a storyboard and set it main interface to see if the issue still exsits – ColeX Jul 21 '17 at 15:26
  • I added a new storyboard and set it to main and now I get the same error but it lists the name of the new board. :/ – Zailyn Tamayo Jul 21 '17 at 15:35
  • if a new project has this error,maybe there was something wrong with the installation ,try to reinstall . – ColeX Jul 21 '17 at 15:39
  • Yes, I have made new project and get this error. I thought it was something to do with XCode so I reinstalled that. I will reinstall Visual Studio and report back. Thanks. – Zailyn Tamayo Jul 21 '17 at 15:41
  • Okay, I reinstalled, created a new project, and I still get the same error. Maybe I didn't completely uninstall because it showed my deleted projects when it started up again? I did restart after removing the application. – Zailyn Tamayo Jul 21 '17 at 15:56
  • I have completely uninstalled XCode and Visual Studio from my Mac and reinstalled. I still get the same error. I am really confused. I get this error on new projects. Not sure what to do other then completely restore my Mac. – Zailyn Tamayo Jul 22 '17 at 02:40
  • I guess something uncorrect in the configuration . check every steps how to install in official toturial. – ColeX Jul 22 '17 at 05:49
0

Okay, the weirdest thing fixed it. I installed an older version of Xarmarin iOS that I got from this page: https://bugzilla.xamarin.com/show_bug.cgi?id=38206

Then when I opened Visual Studio it didn't detect it and had me update it. After updating it, my app was able to debug and the simulator worked fine! Very, very weird!

Zailyn Tamayo
  • 112
  • 1
  • 9