当我尝试在 iOS 模拟器中启动我的应用程序时遇到问题, 我需要有人来解决这个问题,我已经尝试了所有方法,但仍然遇到同样的问题 我收到了这个错误:
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)
最佳答案
这可能是由于不同的原因造成的。检查以下内容:
- 检查 Storyboard名称的拼写。可能不一样或者大写字母可能不一样
- 通过选择Target->Build Phases->Copy Bundle Resources 检查您的资源包是否包含此 Storyboard。如果没有通过下面的加号按钮添加。
- 从 iOS 模拟器中删除您的应用。然后重新安装该应用。
- 尝试重命名 Storyboard并在应用程序 plist 文件的主 Storyboard文件基名中应用相同的名称。
关于ios - 找不到名为的 Storyboard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23622492/