试图找到这次崩溃的原因

时间:2016-01-14 07:01:15

标签: ios swift crashlytics

我正在检查崩解药。跟随堆栈跟踪并出现错误:

HTTPManager.swift line 313
specialized HTTPManager.(createAuthenticationParameters in _F8C28254BDE35F2F2E746C55EB4303F3)() -> [String : AnyObject]

with:

Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x000000010017c690

方法如下:

private func createAuthenticationParameters() -> Dictionary<String, AnyObject> {
    var parameters = [String:AnyObject]()
    if User.sharedInstance.facebookID != nil {
        parameters["facebook_id"] = User.sharedInstance.facebookID!
    } else if User.sharedInstance.email != nil {
        parameters["email"] = User.sharedInstance.email!
    }
    parameters["auth_token"] = User.sharedInstance.authToken!

    return parameters // LINE 313
}

什么可能导致它崩溃?我只把值放在字典中。任何指针都将非常感激。感谢

1 个答案:

答案 0 :(得分:0)

我建议尝试重写代码:

NewConvention