我有一个用户的报告,我的应用程序打开,进入启动屏幕,然后崩溃。他来自运行iOS8的iPhone 5上的葡萄牙。这是他的崩溃日志 - http://justpaste.it/j36w
这是我的第一个iOS应用,所以我无法理解这一点。我看到导致崩溃的异常 - EXC_BREAKPOINT(SIGTRAP),但我真的不明白。
我的第一个想法是它与字符串的本地化有关,但他说他的电话是英文的。有什么想法吗?
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
}