我怎么知道我的应用程序崩溃了?
我从用户那里收到了很多崩溃信息,但是我自己无法重现崩溃信息,并且崩溃日志未指出特定的行:
Thread : Crashed: com.apple.main-thread
0 myapp 0x22d1d4 specialized ItemType.init(coder : NSCoder) -> ItemType? (ItemType.swift)
1 myapp 0x22c72c @objc ItemType.init(coder : NSCoder) -> ItemType? (ItemType.swift)
2 EventKitUI 0x234734a5 (Missing)
3 EventKitUI 0x23479639 (Missing)
4 EventKitUI 0x234161db (Missing)
5 EventKitUI 0x234734a5 (Missing)
6 EventKitUI 0x234728d3 (Missing)
7 myapp 0x1e9df4 specialized Item.init(coder : NSCoder) -> Item? (Item.swift:162)
8 myapp 0x1db9b8 @objc Item.init(coder : NSCoder) -> Item? (Item.swift)
9 EventKitUI 0x234734a5 (Missing)
10 EventKitUI 0x234728d3 (Missing)
11 EventKitUI 0x23471bc7 (Missing)
12 myapp 0x26f370 savedSearchList.getLastItem() -> Item! (savedItemList.swift:71)
13 myapp 0x26c008 specialized MenuInitializerViewController.getSideMenuViewController() -> UIViewController (MenuInitializerViewController.swift:39)
14 myapp 0x18388c SharedAppDelegate.showMainInterface() -> () (SharedAppDelegate.swift:427)
15 myapp 0x18398c @objc SharedAppDelegate.showMainInterface() -> () (SharedAppDelegate.swift)
16 myapp 0x188a48 SharedAppDelegate.(retreiveFirstData(SharedAppDelegate) -> () -> ()).(closure #1) (SharedAppDelegate.swift:290)
17 myapp 0x2657a4 partial apply for UserAppData.(getFirstData(UserAppData) -> (() -> (), failure : (error : NSError) -> ()) -> ()).(closure #3) (UserAppData.swift:45)
18 myapp 0x263828 partial apply for thunk (UserAppData.swift)
19 myapp 0x268c28 UserAppData.(getDiffusionsGroup(UserAppData) -> (() -> (), failure : (error : NSError) -> ()) -> ()).(successBlock #1)(AFHTTPRequestOperation!, responseObject : AnyObject!)() (UserAppData.swift:788)
20 myapp 0x266684 partial apply for UserAppData.(getDiffusionsGroup(UserAppData) -> (() -> (), failure : (error : NSError) -> ()) -> ()).(successBlock #1)(AFHTTPRequestOperation!, responseObject : AnyObject!)() (UserAppData.swift)
21 libtzupdate.dylib 0x344ffe2f (Missing)
22 libtzupdate.dylib 0x344ffe1b (Missing)
23 libtzupdate.dylib 0x345046c9 (Missing)
24 CoreAudio 0x226dc535 (Missing)
25 CoreAudio 0x226daa2f (Missing)
26 CoreAudio 0x2262d0d9 (Missing)
27 CoreAudio 0x2262cecd (Missing)
28 GeoServices 0x2b9a2af9 (Missing)
29 UIKit 0x268b62dd UIApplicationMain + 144
30 myapp 0x10f2d4 main (AppDelegate.swift:16)
31 libtzupdate.dylib 0x34528873 (Missing)
我了解它可能来自ItemType非存档初始化程序,但我看不出它可能有什么问题:
required convenience init?(coder aDecoder: NSCoder)
{
self.index = aDecoder.decodeIntegerForKey("index")
self.name = aDecoder.decodeObjectForKey("name") as! String
self.id = aDecoder.decodeObjectForKey("id") as! String
self.type = Type(rawValue: aDecoder.decodeIntegerForKey("type")) ?? .Default
}
最佳答案
尝试在中添加异常断点和/或Swift错误断点
View->Navigator->Show Breakpoint Navigator
然后点击底部的+图标
关于ios - 如何找出导致我的iOS应用崩溃的原因(EXC_BREAKPOINT)?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35913896/