Swift - 理解iOS崩溃日志

时间:2015-01-26 17:57:06

标签: ios swift logging crash

我有一个用户的报告,我的应用程序打开,进入启动屏幕,然后崩溃。他来自运行iOS8的iPhone 5上的葡萄牙。这是他的崩溃日志 - http://justpaste.it/j36w

这是我的第一个iOS应用,所以我无法理解这一点。我看到导致崩溃的异常 - EXC_BREAKPOINT(SIGTRAP),但我真的不明白。

我的第一个想法是它与字符串的本地化有关,但他说他的电话是英文的。有什么想法吗?

修改:http://justpaste.it/j3jy

EDIT2:

func createBarArray(townName: String, dict: NSDictionary) -> NSMutableArray{

    var barArray = dict[townName] as NSArray
    var bars = [] as NSMutableArray

    // Get day of the week
    let dateFormatter = NSDateFormatter()
    dateFormatter.dateFormat = "EEEE"
    let dayOfWeekString = dateFormatter.stringFromDate(NSDate())

    for bar in barArray{
        var name = bar["name"] as NSString
        var dealsArr = bar[dayOfWeekString] as NSArray
        var deal = dealsArr[0] as NSString
        var lat = bar["lat"] as Double
        var long = bar["long"] as Double
        var negLong = -long

        var newBar = BarAnnotation(latitude: lat, longitude: negLong, name: name, deal: deal)

        switch(townName){
            case "amesBars":
                newBar.town = "Ames"
            case "cedarFallsBars":
                newBar.town = "Cedar Falls"
            case "iowaCityBars":
                newBar.town = "Iowa City"
            default:
                newBar.town = ""
        }

        bars.addObject(newBar)
    }

    return bars
}

1 个答案:

答案 0 :(得分:0)

步骤 -

  1. 获取.app文件
  2. 获取.dSYM文件
  3. 从崩溃报告中获取地址
  4. 运行{{1}}
  5. 为了更好地理解,请检查this article