[英]Iphone app crashes before didFinishLaunchingWithOptions
我的iPhone應用程序正常運行,每當我在設備或模擬器上運行它時,它突然崩潰,並且它沒有在日志中向我報告任何有用的信息,它僅記錄以下無用的信息:
2014-02-05 17:09:34.069 TeacherAssistant[711:60b] (
0 CoreFoundation 0x2ed4ce9b <redacted> + 154
1 libobjc.A.dylib 0x390a96c7 objc_exception_throw + 38
2 UIKit 0x3197beed <redacted> + 0
3 UIKit 0x3174a10d <redacted> + 44
4 UIKit 0x3153ba53 <redacted> + 482
5 UIKit 0x314d6a07 <redacted> + 3142
6 UIKit 0x314d5cfd <redacted> + 72
7 UIKit 0x3153b321 <redacted> + 664
8 GraphicsServices 0x339bb76d <redacted> + 608
9 GraphicsServices 0x339bb357 <redacted> + 34
10 CoreFoundation 0x2ed17777 <redacted> + 34
11 CoreFoundation 0x2ed17713 <redacted> + 346
12 CoreFoundation 0x2ed15edf <redacted> + 1406
13 CoreFoundation 0x2ec80471 CFRunLoopRunSpecific + 524
14 CoreFoundation 0x2ec80253 CFRunLoopRunInMode + 106
15 UIKit 0x3153a5c3 <redacted> + 762
16 UIKit 0x31535845 UIApplicationMain + 1136
17 TeacherAssistant 0x0006c545 main + 220
18 libdyld.dylib 0x395a2ab7 <redacted> + 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文件,並重命名情節提要,使其與實際的情節提要文件名不匹配,可以重現您的錯誤。 我的猜測是您不小心在目標中將其重命名,或者在某個時候更改了情節提要的文件名。
如果您的應用程序使用嵌入式二進制文件,但是沒有在目標>常規>嵌入式二進制文件中添加它們,則可能會發生這種情況。
我當時遇到類似的奇怪問題。 如您所說,該應用程序將在didFinishLaunchingWithOptions之前崩潰。 我嘗試了一些有關確保故事板文件在plist中正確且為目標正確選擇的建議。
我的問題是我在我的plist中引用了不存在的字體。 我更改了字體,卻忘記在plist中進行更改。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.