Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find a storyboard named

Tags:

ios

storyboard

I have problem when I try to launch my app in iOS simulator, I need someone to fix this please, I have tried everything but still I have the same problem I got this error :

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard_iPhone.storyboard' in bundle NSBundle </Users/iYousef911/Library/Application Support/iPhone Simulator/7.1/Applications/F00ED8C4-145B-43C0-ACDA-C41EDC01D824/Azkar.app> (loaded)'
*** First throw call stack:
(
    0   CoreFoundation                      0x029c21e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x027418e5 objc_exception_throw + 44
    2   UIKit                               0x01965400 -[UIStoryboard name] + 0
    3   UIKit                               0x01401692 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 53
    4   UIKit                               0x01401949 -[UIApplication _loadMainInterfaceFile] + 245
    5   UIKit                               0x0140054e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543
    6   UIKit                               0x01414f92 -[UIApplication handleEvent:withNewEvent:] + 3517
    7   UIKit                               0x01415555 -[UIApplication sendEvent:] + 85
    8   UIKit                               0x01402250 _UIApplicationHandleEvent + 683
    9   GraphicsServices                    0x03d21f02 _PurpleEventCallback + 776
    10  GraphicsServices                    0x03d21a0d PurpleEventCallback + 46
    11  CoreFoundation                      0x0293dca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    12  CoreFoundation                      0x0293d9db __CFRunLoopDoSource1 + 523
    13  CoreFoundation                      0x0296868c __CFRunLoopRun + 2156
    14  CoreFoundation                      0x029679d3 CFRunLoopRunSpecific + 467
    15  CoreFoundation                      0x029677eb CFRunLoopRunInMode + 123
    16  UIKit                               0x013ffd9c -[UIApplication _run] + 840
    17  UIKit                               0x01401f9b UIApplicationMain + 1225
    18  Azkar                               0x00002a4d main + 141
    19  libdyld.dylib                       0x0325f701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
like image 577
Yousef Abu Sallamah Avatar asked May 13 '14 03:05

Yousef Abu Sallamah


2 Answers

In info.plist please check if values for properties UISceneStoryboardFile and UIMainStoryboardFile are correct

<key>UISceneStoryboardFile</key>
<string>[MY_PROJECT_NAME]</string>

and

<key>UIMainStoryboardFile</key>
<string>[MY_PROJECT_NAME]</string>
like image 40
Pratik Avatar answered Nov 15 '22 21:11

Pratik


This may be due to different reasons. Check the below:

  1. Check the spelling of your storyboard name. Maybe it is different or capital letters may be different
  2. Check your bundle resources contain this storyboard from by selecting Target->Build Phases->Copy Bundle Resources. If not add it by the below plus button.
  3. Delete your app from the iOS Simulator. Then reinstall the app.
  4. Try to rename the storyboard and apply same name in Main storyboard file base name in your application plist file.
like image 69
manujmv Avatar answered Nov 15 '22 19:11

manujmv