Iphone应用程序在didFinishLaunchingWithOptions之前崩溃

我的iPhone应用程序工作正常,突然它崩溃,每当我在设备或模拟器上运行它并没有报告任何有用的信息在日志它只记录以下无用的信息:

2014-02-05 17:09:34.069 TeacherAssistant[711:60b] ( 0 CoreFoundation 0x2ed4ce9b  + 154 1 libobjc.A.dylib 0x390a96c7 objc_exception_throw + 38 2 UIKit 0x3197beed  + 0 3 UIKit 0x3174a10d  + 44 4 UIKit 0x3153ba53  + 482 5 UIKit 0x314d6a07  + 3142 6 UIKit 0x314d5cfd  + 72 7 UIKit 0x3153b321  + 664 8 GraphicsServices 0x339bb76d  + 608 9 GraphicsServices 0x339bb357  + 34 10 CoreFoundation 0x2ed17777  + 34 11 CoreFoundation 0x2ed17713  + 346 12 CoreFoundation 0x2ed15edf  + 1406 13 CoreFoundation 0x2ec80471 CFRunLoopRunSpecific + 524 14 CoreFoundation 0x2ec80253 CFRunLoopRunInMode + 106 15 UIKit 0x3153a5c3  + 762 16 UIKit 0x31535845 UIApplicationMain + 1136 17 TeacherAssistant 0x0006c545 main + 220 18 libdyld.dylib 0x395a2ab7  + 2 ) 

请在答案中考虑以下内容:

  • 我为所有例外都提出了一个断点

  • 我试图把一个空的视图控制器,并使其the initial view controller ,以便知道问题是否在故事板中,但它也崩溃了

  • 我从iPhone设备上删除了应用程序并进行了清理/构建,但没有任何意思

  • 我删除了所有应用程序派生数据并进行了清理/构建,但也没有意思

  • 配置文件没问题

以下是我在模拟器上尝试时的日志:

 2014-02-05 17:19:17.950 TeacherAssistant[17535:70b] ( 0 CoreFoundation 0x017be5e4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x015418b6 objc_exception_throw + 44 2 UIKit 0x007e3572 -[UIStoryboard name] + 0 3 UIKit 0x002af432 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 53 4 UIKit 0x002af6e9 -[UIApplication _loadMainInterfaceFile] + 245 5 UIKit 0x002ae28f -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543 6 UIKit 0x002c287c -[UIApplication handleEvent:withNewEvent:] + 3447 7 UIKit 0x002c2de9 -[UIApplication sendEvent:] + 85 8 UIKit 0x002b0025 _UIApplicationHandleEvent + 736 9 GraphicsServices 0x020f52f6 _PurpleEventCallback + 776 10 GraphicsServices 0x020f4e01 PurpleEventCallback + 46 11 CoreFoundation 0x01739d65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 12 CoreFoundation 0x01739a9b __CFRunLoopDoSource1 + 523 13 CoreFoundation 0x0176477c __CFRunLoopRun + 2156 14 CoreFoundation 0x01763ac3 CFRunLoopRunSpecific + 467 15 CoreFoundation 0x017638db CFRunLoopRunInMode + 123 16 UIKit 0x002adadd -[UIApplication _run] + 840 17 UIKit 0x002afd3b UIApplicationMain + 1225 18 TeacherAssistant 0x0000a67d main + 157 19 libdyld.dylib 0x02b5e70d start + 1 ) 

提前致谢。

确保您的目标具有为故事板文件输入的正确名称。 我能够通过转到我的目标的Info.plist文件来重现您的错误,并重命名故事板,使其与实际的故事板文件名不匹配。 我的猜测是你不小心在你的目标中重命名了,或者你在某个时候更改了故事板的文件名。

如果您的应用程序使用嵌入式二进制文件,但您尚未在Target> General> Embedded Binaries中添加它们,则可能会发生这种情况。

我有一个类似的奇怪问题。 正如你所说,应用程序会在didFinishLaunchingWithOptions之前崩溃。 我尝试了一些与确保故事板文件在plist中是正确的相关的建议,并且正确地为目标选择了。

我的问题是我在我的plist中引用了一个不存在的字体。 我更改了字体,忘了在我的plist中更改它。